NAME

which - report full paths of commands

SYNOPSIS

which [-a] filename ...

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:

-a

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

--

Stop parsing for options. 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).

AUTHOR

The Perl implementation of which was written by Abigail, perlpowertools@abigail.be. 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.