chiark
/
gitweb
/
~cjwatson
/
bin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56cdeb7
)
pwhich: Use printf rather than echo.
author
Colin Watson
<cjwatson@chiark.greenend.org.uk>
Tue, 1 Oct 2002 11:56:19 +0000
(11:56 +0000)
committer
Colin Watson
<cjwatson@chiark.greenend.org.uk>
Tue, 1 Oct 2002 11:56:19 +0000
(11:56 +0000)
pwhich
patch
|
blob
|
history
diff --git
a/pwhich
b/pwhich
index bf877c20768eae669dd968e53684157ff15f6c31..30d4c67cc8c724a9e483235b5b0e77c90390f087 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