From owner-freebsd-bugs@FreeBSD.ORG Wed Aug 3 15:20:07 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8A1816A41F for ; Wed, 3 Aug 2005 15:20:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8463243D5D for ; Wed, 3 Aug 2005 15:20:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j73FK62U026100 for ; Wed, 3 Aug 2005 15:20:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j73FK67N026099; Wed, 3 Aug 2005 15:20:06 GMT (envelope-from gnats) Resent-Date: Wed, 3 Aug 2005 15:20:06 GMT Resent-Message-Id: <200508031520.j73FK67N026099@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, garys@opusnet.com Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81BC816A41F for ; Wed, 3 Aug 2005 15:18:45 +0000 (GMT) (envelope-from garys@opusnet.com) Received: from opusnet.com (mail.opusnet.com [209.210.200.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE2A943D5E for ; Wed, 3 Aug 2005 15:18:42 +0000 (GMT) (envelope-from garys@opusnet.com) Received: from localhost.localhost [70.98.246.232] by opusnet.com with ESMTP (SMTPD32-8.05) id A051901600EA; Wed, 03 Aug 2005 08:18:41 -0700 Received: from localhost.localhost (localhost.localhost [127.0.0.1]) by localhost.localhost (8.13.3/8.13.3) with ESMTP id j73FKJIO006792 for ; Wed, 3 Aug 2005 08:20:19 -0700 (PDT) (envelope-from garys@opusnet.com) Received: (from jojo@localhost) by localhost.localhost (8.13.3/8.13.3/Submit) id j73FKErs006791; Wed, 3 Aug 2005 08:20:14 -0700 (PDT) (envelope-from garys@opusnet.com) Message-Id: Date: Wed, 03 Aug 2005 08:20:14 -0700 From: "Gary W. Swearingen" To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: misc/84520: whatis(1) program burps on /bin/[ X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: garys@opusnet.com List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2005 15:20:07 -0000 >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: