aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/whereis
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>1996-12-23 18:55:32 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>1996-12-23 18:55:32 +0000
commit2fc6cb6a374327e6713cb3ed3e0375310dcdfefb (patch)
tree0b3d36ea32a343e32b0f2090feda88c92b5e91d0 /usr.bin/whereis
parent3d20a1ff0303ee2a2b87b8f8d15a51a8a4d371ab (diff)
Notes
Diffstat (limited to 'usr.bin/whereis')
-rw-r--r--usr.bin/whereis/whereis.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/whereis/whereis.pl b/usr.bin/whereis/whereis.pl
index 2f4e9dbdf79cd..520c3d4aa6df2 100644
--- a/usr.bin/whereis/whereis.pl
+++ b/usr.bin/whereis/whereis.pl
@@ -28,7 +28,7 @@
#
# Rewritten from scratch for FreeBSD after the 4.3BSD manual page.
#
-# $Id$
+# $Id: whereis.pl,v 1.1 1996/06/15 12:29:48 joerg Exp $
#
sub usage
@@ -117,13 +117,15 @@ if (!defined(@manuals)) {
#
# first, use default manpath, then append user's $MANPATH
#
+ local($usermanpath) = $ENV{'MANPATH'};
+ delete $ENV{'MANPATH'};
local($manpath) = `/usr/bin/manpath`;
local(@list, %path, $i);
chop($manpath);
@list = &decolonify($manpath);
- push(@list, &decolonify($ENV{'MANPATH'}));
+ push(@list, &decolonify($usermanpath));
# remove duplicates
foreach (@list) {
@@ -220,7 +222,7 @@ foreach $name (@names) {
# source directories, and at least one further level of
# subdirectories.
#
- if (!$found && open(LOCATE, "locate */$name|")) {
+ if (!$found && open(LOCATE, "locate */$name 2>/dev/null |")) {
locate_item:
while (chop($loc = <LOCATE>)) {
foreach (@sources) {