summaryrefslogtreecommitdiffstats
path: root/wtf
diff options
context:
space:
mode:
authordrochner <drochner@NetBSD.org>1999-07-27 15:41:27 +0000
committerdrochner <drochner@NetBSD.org>1999-07-27 15:41:27 +0000
commitd0abda98e89948088de49cb3c2f192c15aa4518d (patch)
treef793e7dd2a6fe37af0566d3e5212b5b6f595eab9 /wtf
parentce9197ac9b1e7a0c93e6b4a80f36e95b7f5a0fce (diff)
downloadbsdgames-darwin-d0abda98e89948088de49cb3c2f192c15aa4518d.tar.gz
bsdgames-darwin-d0abda98e89948088de49cb3c2f192c15aa4518d.tar.zst
bsdgames-darwin-d0abda98e89948088de49cb3c2f192c15aa4518d.zip
make sure only whole words are matched, use [:space:] RE to avoid embedded
<TAB>s
Diffstat (limited to 'wtf')
-rw-r--r--wtf/wtf5
1 files changed, 3 insertions, 2 deletions
diff --git a/wtf/wtf b/wtf/wtf
index f810817a..c4a0d893 100644
--- a/wtf/wtf
+++ b/wtf/wtf
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: wtf,v 1.3 1999/07/25 20:29:04 briggs Exp $
+# $NetBSD: wtf,v 1.4 1999/07/27 15:41:27 drochner Exp $
#
# Public domain
#
@@ -18,7 +18,8 @@ fi
rv=0
while [ $# -gt 0 ] ; do
target=`echo $1 | tr '[a-z]' '[A-Z]'`
- ans=`sed -ne "/^$target/s/^$target[ ]*//p" < $acronyms 2>/dev/null`
+ ans=`sed -ne "/^$target[[:space:]]/s/^$target[[:space:]]*//p" \
+ < $acronyms 2>/dev/null`
if [ "$ans" != "" ] ; then
echo "$target: $ans"
else