which -- report full paths of commands.
which [option] [commands]
which prints the full paths to the commands given as arguments, depending on the $PATH environment variable. Nothing is printed if the command is not found.
which accepts the following options:
- --help
-
Print out a short help message, then exit.
- --version
-
Print out its version number, then exit.
- --
-
Stop parsing for options. Useful if you want to find where in your path the
commands --help and --version are found. Use which -- -- to find the path to --.
The environment variable $PATH is used to find the list of directories to check for commands.
which has no known bugs.
Traditionally, which also parses ones ~/.cshrc file to look for aliases, and reporting the alias when applicable. This
version of
which does not do that, because there are more shells than csh.
$Log: which,v $
Revision 1.1 1999/02/25 04:57:21 abigail
Initial revision
The Perl implementation of which was written by Abigail, abigail@fnx.com.
This program is copyright by Abigail 1999.
This program is free and open software. You may use, modify, distribute and
sell this program (and any modified variants) in any way you wish, provided
you do not restrict others to do the same.