# which cmd: which cmd in PATH is executed, version 1
case $# in
0) echo 'Usage: which command' 1>&2; exit 2
for i in `echo $PATH | sed 's/^:/.:/
if test -f $i/$1 # use test -x if you can
exit 0 # found it
exit 1 # not found
- Printing the Location of a Command with which
- Selecting a Group on Which to Operate
- 5.2 Что представляет собой команда which?
- 12.7 Which Version Control System?
- Which Emacs Is Which?
- 188.8.131.52 Which shell?
- 3.8.65 which1.H
- 3.8.66 which2
- Appendix E. Other resources and links
- IP characteristics
- IP headers