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.
-a
displays all interpretations for name.
-f
does not check to see if the shell can interpret name as a function.
-p
does not check to see if the shell can interpret name as a function, a shell keyword, a built-in command, or an alias.
-v
gives a more verbose report.
0
Successful completion.
1
Command name could not be found.
2
Failure 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.