#! /bin/sh -
#
#	@(#)Which	3.1 (motonori/WIDE) 22 Jun 1995
#
#	A script to search a command from directories defined in $PATH
#

target=$1

IFS=:
set $PATH

while [ "$1" ]
do
	if [ -f $1/$target ]
	then
		echo $1/$target
		exit 0
	fi
	shift
done

exit 0
