chiark / gitweb /
pwhich: Use printf rather than echo.
authorColin Watson <cjwatson@chiark.greenend.org.uk>
Tue, 1 Oct 2002 11:56:19 +0000 (11:56 +0000)
committerColin Watson <cjwatson@chiark.greenend.org.uk>
Tue, 1 Oct 2002 11:56:19 +0000 (11:56 +0000)
pwhich

diff --git a/pwhich b/pwhich
index bf877c2..30d4c67 100755 (executable)
--- a/pwhich
+++ b/pwhich
@@ -8,14 +8,14 @@ for PROGRAM in "$@"; do
  case $PROGRAM in
   */*)
    if [ -x "$PROGRAM" ]; then
-    echo "$PROGRAM"
+    printf '%s\n' "$PROGRAM"
     RET=0
    fi
    ;;
   *)
    for ELEMENT in $PATH; do
     if [ -x "$ELEMENT/$PROGRAM" ]; then
-     echo "$ELEMENT/$PROGRAM"
+     printf '%s\n' "$ELEMENT/$PROGRAM"
      RET=0
      break
     fi