chiark / gitweb /
pwhich: Portability fix, picked up by 'posh'.
authorColin Watson <cjwatson@chiark.greenend.org.uk>
Mon, 23 Sep 2002 13:41:19 +0000 (13:41 +0000)
committerColin Watson <cjwatson@chiark.greenend.org.uk>
Mon, 23 Sep 2002 13:41:19 +0000 (13:41 +0000)
pwhich

diff --git a/pwhich b/pwhich
index 47aa80c..c78b4cd 100755 (executable)
--- 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