#!/bin/sh
# Look for $1 somewhere in $PATH
#  will print out the full pathname unless
#  called with the '-s' option
#
if [ $1 = "-s" ]; then
    shift
    echo="#"
else
    echo="echo"
fi

for path in `echo $PATH |
 sed 's/^:/.:/
      s/::/:.:/g
      s/:$/:./
      s/:/ /g' `
do
    if [ -x $path/$1 ]; then
    	eval $echo $path/$1
	exit 0
    fi
done
exit 1
