Don't strip trailing .suffixes from filenames. Although obviously

intentional, this behaviour is far too obnoxious given the number of
filenames such as rpc.statd we have.

Submitted by:	Chris Costello [3]chris@calldei.com (bin/11303)
This commit is contained in:
Tim Vanderhoek 1999-06-21 19:52:09 +00:00
parent e9ebca08d7
commit 2a059832d8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48086
2 changed files with 6 additions and 5 deletions

View File

@ -31,7 +31,7 @@
.\"
.\" @(#)whereis.1 8.2 (Berkeley) 12/30/93
.\"
.\" $Id: whereis.1,v 1.5 1998/05/15 11:22:40 jkoshy Exp $
.\" $Id: whereis.1,v 1.6 1998/08/31 16:41:08 wosch Exp $
.\"
.Dd June 15, 1996
.Dt WHEREIS 1
@ -51,8 +51,10 @@ The
utility checks the standard binary, manual page, and source
directories for the specified programs, printing out the paths of any
it finds. The supplied names are first stripped of leading path name
components, any single trailing extension of the form
.Ql .ext ,
components, any single trailing extension added by
.Xr gzip 1
or
.Xr compress 1 ,
and the leading
.Ql s.
or trailing

View File

@ -28,7 +28,7 @@
#
# Rewritten from scratch for FreeBSD after the 4.3BSD manual page.
#
# $Id: whereis.pl,v 1.5 1997/12/22 19:11:28 ache Exp $
# $Id: whereis.pl,v 1.6 1998/10/04 10:33:37 obrien Exp $
#
sub usage
@ -176,7 +176,6 @@ foreach $name (@names) {
$name =~ s|^.*/||; # strip leading path name component
$name =~ s/,v$//; $name =~ s/^s\.//; # RCS or SCCS suffix/prefix
$name =~ s/\.(Z|z|gz)$//; # compression suffix
$name =~ s/\.[^.]+//; # any other suffix
$line = "";
$unusual = 0;