#!/bin/sh # Look for $1 somewhere in $PATH # will print out the full pathname unless # called with the '-s' option # if [ "x$1" = "x-s" ]; then shift else echo="yes" fi for path in `echo $PATH | sed 's/^;/.;/ s/;;/;.;/g s/;$/;./ s/;/ /g s/\\\\/\\//g' ` do if [ -r $path/$1.exe ] && [ ! -d $path/$1.exe ]; then if [ "$echo" = "yes" ]; then echo $path/$1.exe fi exit 0 fi done exit 1