FAILMSG=`file /elsewhere/nosuchfilehere 2>/dev/stdout|grep nosuchfilehere|tail -c 20 ` file `echo $PATH|awk -v sought=$1 'BEGIN{FS=":"};{for (jj=NF; jj>0; --jj) {print $jj "/" sought;}}'`|grep -v "$FAILMSG"