diff options
author | eadler <eadler@NetBSD.org> | 2018-03-07 08:25:43 +0000 |
---|---|---|
committer | eadler <eadler@NetBSD.org> | 2018-03-07 08:25:43 +0000 |
commit | 57bc57ad1f6cf3c1b77a74e6d12a5105a832ba2f (patch) | |
tree | 3a661738941145624967ab96657e5f7dc7d8b3af /wtf | |
parent | 2bdc9854fedd3774fe0fbf5c37845f7898f1e326 (diff) | |
download | bsdgames-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/wtf | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |