NetBSD Problem Report #8388
Received: (qmail 28148 invoked from network); 12 Sep 1999 20:54:51 -0000
Message-Id: <199909122049.XAA03225@kolster.fi>
Date: Sun, 12 Sep 1999 23:49:39 +0300 (EEST)
From: Antti Kantee <pooka@iki.fi>
Reply-To: pooka@iki.fi
To: gnats-bugs@gnats.netbsd.org
Subject: wtf(6) matches regular expressions, not literals
X-Send-Pr-Version: 3.95
>Number: 8388
>Category: misc
>Synopsis: wtf should match literals
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Sep 12 14:05:01 +0000 1999
>Closed-Date: Mon Nov 15 19:14:11 +0000 1999
>Last-Modified: Mon Nov 15 19:17:55 +0000 1999
>Originator: Antti Kantee
>Release: -current supped 12th Sep
>Organization:
>Environment:
NetBSD 1.4K
>Description:
babylon5:3:~> wtf ..
..: evil grin
real life
significant other
ie. it matches all 2-character acronyms
>How-To-Repeat:
see above
>Fix:
Something along the lines of:
--- wtf.old Sun Sep 5 22:42:41 1999
+++ wtf Sun Sep 12 23:36:47 1999
@@ -18,8 +18,9 @@
rv=0
while [ $# -gt 0 ] ; do
target=`echo $1 | tr '[a-z]' '[A-Z]'`
- ans=`sed -ne "/^$target[[:space:]]/s/^$target[[:space:]]*//p" \
- < $acronyms 2>/dev/null`
+ ans=`egrep -F $target < $acronyms | \
+ sed -ne "/^$target[[:space:]]/s/^$target[[:space:]]*//p" \
+ 2>/dev/null`
if [ "$ans" != "" ] ; then
echo "$target: $ans"
else
but I have to admit I'd rather use a fix that wouldn't require the usage of
egrep. (and it doesn't prefectly fix the problem anyhow, but hey, I'm very
tired at the moment ;)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: hubertf
State-Changed-When: Mon Nov 15 11:14:11 PST 1999
State-Changed-Why:
Fixed with a bit different command, as per
previous discussion on IRC.
thanks !
- Hubert
.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.