NAME

which -- report full paths of commands.

SYNOPSIS

which [option] [commands]

DESCRIPTION

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.

OPTIONS

which accepts the following options:

--help

Print out a short help message, then exit.

--version

Print out its version number, then exit.

-a

Print out all instances of command on $PATH not just the first.

--

Stop parsing for options. Useful if you want to find where in your path the commands --help, -a, and --version are found. Use which -- -- to find the path to --.

ENVIRONMENT

The environment variable $PATH (also DCL$PATH under DCL; or $Commands under MPW) is used to find the list of directories to check for commands. The variable %PATHEXT% is examined for command extensions if it exists.

BUGS

which has no known bugs.

COMPATABILITY

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.

which will examine aliases under MPW (Mac) and symbols under DCL (VMS).

REVISION HISTORY

$Log: which,v $
Revision 1.1.1.1  2001/06/06 08:55:22  sdague
initial import

Revision 1.1  2001/05/14 00:49:40  sdague
added more files

Revision 1.1  1999/02/25 04:57:21  abigail
Initial revision

AUTHOR

The Perl implementation of which was written by Abigail, abigail@fnx.com. Portability enhancements by Peter Prymmer.

COPYRIGHT and LICENSE

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.