summaryrefslogtreecommitdiff
path: root/usr.bin/which
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1995-01-30 17:49:19 +0000
committerSatoshi Asami <asami@FreeBSD.org>1995-01-30 17:49:19 +0000
commit106a8c2a7b6ef5f8a2e5a5826859ecc9cddd3ac3 (patch)
tree6d52e5a875030f98b2679fc8d26ca9b4a2ca15ba /usr.bin/which
parent2c80666172ec292627c41883b1ca5fdf2ef21e36 (diff)
downloadsrc-test2-106a8c2a7b6ef5f8a2e5a5826859ecc9cddd3ac3.tar.gz
src-test2-106a8c2a7b6ef5f8a2e5a5826859ecc9cddd3ac3.zip
Notes
Diffstat (limited to 'usr.bin/which')
-rwxr-xr-xusr.bin/which/which.pl12
1 files changed, 3 insertions, 9 deletions
diff --git a/usr.bin/which/which.pl b/usr.bin/which/which.pl
index bd24a2a4aee4..a8d600b463e2 100755
--- a/usr.bin/which/which.pl
+++ b/usr.bin/which/which.pl
@@ -31,7 +31,7 @@
#
# [whew!]
#
-# $Id: which.pl,v 1.1 1995/01/26 21:49:54 jkh Exp $
+# $Id: which.pl,v 1.2 1995/01/28 17:35:56 asami Exp $
$all = 0;
$silent = 0;
@@ -49,17 +49,11 @@ if ($ARGV[0] eq "-a") {
foreach $prog (@ARGV) {
foreach $e (@path) {
if (-x "$e/$prog") {
- if (! $silent) {
- print "$e/$prog\n";
- }
+ print "$e/$prog\n" unless $silent;
$found = 1;
last unless $all;
}
}
}
-if ($found) {
- exit 0;
-} else {
- exit 1;
-}
+exit (!$found);