whence

identify how KornShell interprets command name

KornShell Built-in


SYNOPSIS

whence [-a] [-f] [-p] [-v] name ...


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.


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

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.


SEE ALSO

Commands:
command, sh, which


Updated MKS Toolkit [3khat16.ico]HP3000 [3khat16.ico]3kMail [archive16.gif]