SYNOPSIS
whence
[
DESCRIPTION
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.
Options
-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.
ENVIRONMENT VARIABLES
- PATHEXT
-
contains a list of file extensions (separated by semicolons) for executable commands. Matching files with these extensions are searched for when the exact command name is not found. As the shell searches each directory in the search path, it appends each of the extensions in the list, in turn, to the command name and if it matches a file name in that directory, that file is executed as though it had that extension.
By default, PATHEXT, has the value of Windows NT/2000/XP/2003/Vista's PATHEXT variable with .com;.exe;.bat;.sh;.ksh;.csh;.sed;.awk;.pl appended (omitting any extensions already represented in PATHEXT).
DIAGNOSTICS
Possible exit status values are:
- 0
-
Successful completion.
- 1
-
Command name could not be found.
- 2
-
Failure due to an invalid command line argument.
PORTABILITY
Windows 2000. Windows XP. Windows Server 2003. Windows Vista.
On UNIX systems, whence is built into the KornShell, but is not in the Bourne Shell. It is an extension to the POSIX.2 and XPG standards.
See command for the POSIX.2 and XPG replacement.
NOTE
This command is built into the MKS KornShell.
AVAILABILITY
MKS Toolkit for Power Users
MKS Toolkit for System Administrators
MKS Toolkit for Developers
MKS Toolkit for Interoperability
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
Using the MKS KornShell
MKS Toolkit 9.2 Documentation Build 16.