summaryrefslogtreecommitdiffstats
path: root/wtf
diff options
context:
space:
mode:
authorwiz <wiz@NetBSD.org>2012-10-03 19:50:06 +0000
committerwiz <wiz@NetBSD.org>2012-10-03 19:50:06 +0000
commit528295fa6283641a79b452d57f12c2ce353ca160 (patch)
treea2b18e10ef97ae3998db058337ea31429ae30ae2 /wtf
parentbaf8e2d4626b46042b9b363a7a2525a39a4bf829 (diff)
downloadbsdgames-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/wtf10
1 files changed, 5 insertions, 5 deletions
diff --git a/wtf/wtf b/wtf/wtf
index 0042f8e1..d1167a9c 100644
--- a/wtf/wtf
+++ b/wtf/wtf
@@ -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")"