diff options
author | drochner <drochner@NetBSD.org> | 1999-07-27 15:41:27 +0000 |
---|---|---|
committer | drochner <drochner@NetBSD.org> | 1999-07-27 15:41:27 +0000 |
commit | d0abda98e89948088de49cb3c2f192c15aa4518d (patch) | |
tree | f793e7dd2a6fe37af0566d3e5212b5b6f595eab9 /wtf | |
parent | ce9197ac9b1e7a0c93e6b4a80f36e95b7f5a0fce (diff) | |
download | bsdgames-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/wtf | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |