Module Name: src
Committed By: eadler
Date: Wed Mar 7 08:25:43 UTC 2018
Modified Files:
src/games/wtf: wtf
Log Message:
wtf(6): use character classes
ok pgoyette@ silence dholland@
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/games/wtf/wtf
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/games/wtf/wtf
diff -u src/games/wtf/wtf:1.23 src/games/wtf/wtf:1.24
--- src/games/wtf/wtf:1.23 Wed Mar 7 08:24:16 2018
+++ src/games/wtf/wtf Wed Mar 7 08:25:43 2018
@@ -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