Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/wtf wtf(6): use character classes



details:   https://anonhg.NetBSD.org/src/rev/4bf14d0dc53a
branches:  trunk
changeset: 321228:4bf14d0dc53a
user:      eadler <eadler%NetBSD.org@localhost>
date:      Wed Mar 07 08:25:43 2018 +0000

description:
wtf(6): use character classes

ok pgoyette@ silence dholland@

diffstat:

 games/wtf/wtf |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 1e023e4443fe -r 4bf14d0dc53a games/wtf/wtf
--- a/games/wtf/wtf     Wed Mar 07 08:24:16 2018 +0000
+++ b/games/wtf/wtf     Wed Mar 07 08:25:43 2018 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index