rizin/sys/whereis.sh
2013-06-11 12:25:56 +02:00

10 lines
130 B
Bash
Executable file

#!/bin/sh
[ -z "$1" ] && exit 1
export IFS=:
for a in $PATH ; do
if [ -x "$a/$1" ]; then
echo "$a/$1"
exit 0
fi
done
exit 1