From b60de1afb057f30cde9ea1306220aff6dbcb1df3 Mon Sep 17 00:00:00 2001 From: Satoshi Asami Date: Wed, 2 Aug 1995 07:30:37 +0000 Subject: [PATCH] Submitted by: Wolfram Schneider The currently (1995/07/31 04:22:07) implemented if (-x "$prog") { works only if you have '.' in your $PATH variable. --- usr.bin/which/which.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/which/which.pl b/usr.bin/which/which.pl index 678466b97e5..edf4c209efa 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 {