diff options
author | wiz <wiz@NetBSD.org> | 2012-10-03 19:50:06 +0000 |
---|---|---|
committer | wiz <wiz@NetBSD.org> | 2012-10-03 19:50:06 +0000 |
commit | 528295fa6283641a79b452d57f12c2ce353ca160 (patch) | |
tree | a2b18e10ef97ae3998db058337ea31429ae30ae2 /wtf | |
parent | baf8e2d4626b46042b9b363a7a2525a39a4bf829 (diff) | |
download | bsdgames-darwin-528295fa6283641a79b452d57f12c2ce353ca160.tar.gz bsdgames-darwin-528295fa6283641a79b452d57f12c2ce353ca160.tar.zst bsdgames-darwin-528295fa6283641a79b452d57f12c2ce353ca160.zip |
- correct `usage' message;
- improve wording.
From Bug Hunting.
Diffstat (limited to 'wtf')
-rw-r--r-- | wtf/wtf | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: wtf,v 1.17 2012/04/26 03:16:13 christos Exp $ +# $NetBSD: wtf,v 1.18 2012/10/03 19:50:06 wiz Exp $ # # Public domain # @@ -8,7 +8,7 @@ PROGNAME="$(basename "$0")" usage() { - echo "Usage: $PROGNAME [-f dbfile] [is] <acronym>" + echo "usage: $PROGNAME [-f dbfile] [is] <acronym> ..." exit 1 } @@ -39,21 +39,21 @@ if [ -z "$acronyms" ]; then fi if [ -z "$acronyms" ]; then - echo "$PROGNAME: acronyms database not found!" >&2 + echo "$PROGNAME: acronym database not found!" >&2 exit 1 fi for f in $acronyms; do if [ ! -f $f ]; then - echo "$PROGNAME: cannot open acronyms database file \`$f'" >&2 + echo "$PROGNAME: cannot open acronym database file \`$f'" >&2 exit 1 fi done rv=0 for i; do - # Search acronyms list first + # Search acronym list first target="$(echo "$i" | tr '[a-z]' '[A-Z]')" ans="$(fgrep -h "$target" $acronyms 2>/dev/null \ | sed -ne "\|^$target[[:space:]]|s|^$target[[:space:]]*||p")" |