misc/84520: whatis(1) program burps on /bin/[
Gary W. Swearingen
garys at opusnet.com
Wed Aug 3 15:20:07 GMT 2005
>Number: 84520
>Category: misc
>Synopsis: whatis(1) program burps on /bin/[
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Aug 03 15:20:06 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Gary W. Swearingen
>Release: FreeBSD 5.4-RELEASE i386
>Organization:
none
>Environment:
n/a
>Description:
The "whatis"/"apropos" script doesn't handle the "/bin/[" program.
>How-To-Repeat:
$ /usr/bin/whatis [
grep: Unmatched [ or [^
[: nothing appropriate
$ /usr/bin/apropos [
grep: Unmatched [ or [^
[: nothing appropriate
>Fix:
patch gives this:
$ whatis [
ihfc(4) - isdn4bsd ISA Cologne Chip HFC[-S][-SP] 2B[DS0] driver
test(1), [(1) - condition evaluation utility
$ apropos [
ct(4) - WD33C93[ABC] based CBUS SCSI host adapter driver
ihfc(4) - isdn4bsd ISA Cologne Chip HFC[-S][-SP] 2B[DS0] driver
ndiscvt(8) - convert Windows[rg] NDIS drivers for use with
test(1), [(1) - condition evaluation utility
I gave up after a serious try at developing a more general fix.
I'd normally use an "if", but the script seems to like "case" and
it does prepare for additional exceptional cases.
--- /usr/bin/whatis Sun May 8 00:02:01 2005
+++ /tmp/whatis Tue Aug 2 16:16:44 2005
@@ -84,6 +84,10 @@
for manpage
do
+ case "$manpage" in
+ '[') manpage='\[';;
+ esac
+
if grep -Ehi $grepopt -- "$manpage" $mandir; then :
else
echo "$manpage: nothing appropriate"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list