3 # mhn.find.sh -- check if a particular command is available
8 echo "usage: mhn.find.sh search-path program" 1>&2
12 # PATH to search for programs
15 # program to search for
18 PGM= oIFS="$IFS" IFS=":"
19 for A in $SEARCHPATH; do
21 # skip the directories `.' and `..'
22 if test "$A" = "." -o "$A" = ".."; then
26 # if program was found in /usr/local/bin, then
27 # just echo program name, else echo full pathname
28 if test -f "$A/$PROGRAM"; then
29 if test "$A" = "/usr/local/bin"; then