Module Name: src Committed By: wiz Date: Wed Oct 3 19:50:07 UTC 2012
Modified Files: src/games/wtf: wtf Log Message: - correct `usage' message; - improve wording. >From Bug Hunting. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 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.17 src/games/wtf/wtf:1.18 --- src/games/wtf/wtf:1.17 Thu Apr 26 03:16:13 2012 +++ src/games/wtf/wtf Wed Oct 3 19:50:06 2012 @@ -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")"