summaryrefslogtreecommitdiffstats
path: root/wtf
diff options
context:
space:
mode:
authoreadler <eadler@NetBSD.org>2018-03-07 08:25:43 +0000
committereadler <eadler@NetBSD.org>2018-03-07 08:25:43 +0000
commit57bc57ad1f6cf3c1b77a74e6d12a5105a832ba2f (patch)
tree3a661738941145624967ab96657e5f7dc7d8b3af /wtf
parent2bdc9854fedd3774fe0fbf5c37845f7898f1e326 (diff)
downloadbsdgames-darwin-57bc57ad1f6cf3c1b77a74e6d12a5105a832ba2f.tar.gz
bsdgames-darwin-57bc57ad1f6cf3c1b77a74e6d12a5105a832ba2f.tar.zst
bsdgames-darwin-57bc57ad1f6cf3c1b77a74e6d12a5105a832ba2f.zip
wtf(6): use character classes
ok pgoyette@ silence dholland@
Diffstat (limited to 'wtf')
-rw-r--r--wtf/wtf4
1 files changed, 2 insertions, 2 deletions
diff --git a/wtf/wtf b/wtf/wtf
index 27ca8057..877b573a 100644
--- a/wtf/wtf
+++ b/wtf/wtf
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: wtf,v 1.23 2018/03/07 08:24:16 eadler Exp $
+# $NetBSD: wtf,v 1.24 2018/03/07 08:25:43 eadler Exp $
#
# Public domain
#
@@ -74,7 +74,7 @@ done
rv=0
for i; do
# Search acronym list first
- target="$(echo "$i" | tr '[a-z]' '[A-Z]')"
+ target="$(echo "$i" | tr '[:lower:]' '[:upper:]')"
ans="$(fgrep -h "$target" $acronyms 2>/dev/null \
| sed -ne "\|^$target[[:space:]]|s|^$target[[:space:]]*||p")"
if [ -n "$ans" ] ; then