whenceidentify how KornShell interprets command name |
KornShell Built-in |
whence [-a] [-f]
[-p] [-v] name ...
whence tells how the KornShell would interpret each
name if used as a command name. Shell keywords, aliases, functions,
built-in commands, and executable files are distinguished. For executable files,
the path name of the file is given.
The main difference between whence and
which
is that whence is built into the shell and thus can take
into account shell internal commands.
-adisplays all interpretations for name.
-fdoes not check to see if the shell can interpret name as a function.
-pdoes not check to see if the shell can interpret name as a function, a shell keyword, a built-in command, or an alias.
-vgives a more verbose report.
0Successful completion.
1Command name could not be found.
2Failure due to an invalid command line argument.
whence is built into the KornShell,
but is not in the Bourne Shell.command for the POSIX.2
and XPG replacement.