From: Colin Watson Date: Mon, 23 Sep 2002 13:41:19 +0000 (+0000) Subject: pwhich: Portability fix, picked up by 'posh'. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?p=bin.git;a=commitdiff_plain;h=4aa66313a1043b7586a1a71d94d3fa07667d7a91 pwhich: Portability fix, picked up by 'posh'. --- diff --git a/pwhich b/pwhich index 47aa80c..c78b4cd 100755 --- a/pwhich +++ b/pwhich @@ -5,7 +5,7 @@ for PROGRAM in "$@"; do IFS_SAVE="$IFS" IFS=: for ELEMENT in $PATH; do - if [ -f "$ELEMENT/$PROGRAM" -a -x "$ELEMENT/$PROGRAM" ]; then + if [ -f "$ELEMENT/$PROGRAM" ] && [ -x "$ELEMENT/$PROGRAM" ]; then echo "$ELEMENT/$PROGRAM" RET=0 break