cwhich - locate a program file including aliases and paths.
cwhich [-apsv] name [...]
cwhich [-h]
cwhich takes a list of names and looks for the files which would be executed had these names been given as commands. Each argument is expanded if it is aliased, and searched for along the user's PATH. Both aliases and path are taken from information provided by the parent process and environment.
-a continue to search the PATH until all instances of a program file are found. |
-h print help message |
-p returns the PATH and ALIASES defined by non-interactive shell |
-s suppress messages to standard output |
-v enable output of error messages |
None
A diagnostic is given for names which are aliased to more than a single word, or if an executable file with the argument name was not found in the path.
There are no known bugs. Please direct your bug reports to wulf@ping.net.au
The original which command appeared in 3.0BSD. cwhich is an attempt to satisfy the functionality requirements of the which utility independent from the underlaying shell program and its environment. This work was triggered after a challenge by developers that this couldn't be achieved using the C-language.