summaryrefslogtreecommitdiffstats
path: root/usr.bin/which
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1995-08-02 07:30:37 +0000
committerasami <asami@FreeBSD.org>1995-08-02 07:30:37 +0000
commitb5a04815104ca32e7292221d2619a223b5584472 (patch)
tree7d31385e26af33e0eb9672a4bc23f0f98b768981 /usr.bin/which
parentaa6b65d135b586d40dd8315157e6030918e8acc0 (diff)
downloadFreeBSD-src-b5a04815104ca32e7292221d2619a223b5584472.zip
FreeBSD-src-b5a04815104ca32e7292221d2619a223b5584472.tar.gz
Submitted by: Wolfram Schneider <w@cs.tu-berlin.de>
The currently (1995/07/31 04:22:07) implemented if (-x "$prog") { works only if you have '.' in your $PATH variable.
Diffstat (limited to 'usr.bin/which')
-rwxr-xr-xusr.bin/which/which.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/which/which.pl b/usr.bin/which/which.pl
index 678466b..edf4c20 100755
--- a/usr.bin/which/which.pl
+++ b/usr.bin/which/which.pl
@@ -31,7 +31,7 @@
#
# [whew!]
#
-# $Id: which.pl,v 1.4 1995/01/30 22:21:29 jkh Exp $
+# $Id: which.pl,v 1.5 1995/07/31 04:22:07 asami Exp $
$all = 0;
$silent = 0;
@@ -47,7 +47,7 @@ if ($ARGV[0] eq "-a") {
}
foreach $prog (@ARGV) {
- if (-x "$prog") {
+ if ("$prog" =~ '/' && -x "$prog") {
print "$prog\n" unless $silent;
$found = 1;
} else {
OpenPOWER on IntegriCloud