Return to which.csh CVS log | Up to [local] / src / usr.bin / which |
version 1.2, 1996/06/26 05:42:58 | version 1.3, 1997/01/07 15:38:58 | ||
---|---|---|---|
|
|
||
if ( -x $i/$arg && ! -d $i/$arg ) then | if ( -x $i/$arg && ! -d $i/$arg ) then | ||
echo $i/$arg | echo $i/$arg | ||
set found | set found | ||
set one_found | |||
break | break | ||
endif | endif | ||
end | end | ||
endif | endif | ||
if ( ! $?found ) then | if ( ! $?found ) then | ||
echo no $arg in $path | echo no $arg in $path | ||
set one_missed | |||
endif | endif | ||
end | end | ||
if ( $?one_missed ) then | |||
if ( $?one_found ) then | |||
exit 1 | |||
else | |||
exit 2 | |||
endif | |||
else | |||
exit 0 | |||
endif |