On Tue, 2 May 2000, Joe Knapka wrote:
> Sounds like you want "which".
Okay, here's my small contribution. I call it 'path', and it will
print out all matching executables in the PATH list. Of course, the first
one the shell finds is the one it uses.
============================= cut here =================================
#!/bin/sh
# path --- print the possible PATH solutions for args
#
IFS=":$IFS"
for ARG
do
for DIR in $PATH
do
test -x $DIR/$ARG && echo $DIR/$ARG
done
done
============================= cut here =================================
so "path ls" produces:
/home/danny/bin/ls
/bin/ls
Hope it helps!
Danny
--
To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.