summaryrefslogtreecommitdiffstats
path: root/wtf/wtf
blob: 32a5b69e3712d65a6d39998ccb5d491514cd3a58 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
#
#	$NetBSD: wtf,v 1.1 1999/07/22 01:03:20 mrg Exp $
#
# Public domain
#

acronyms=${ACRONYMDB:-/usr/share/misc/acronyms}

if [ $1 = "is" ] ; then
	shift
fi

if [ $# -lt 1 ] ; then
	echo "Usage: $0 [is] <acronym>"
fi

rv=0
while [ $# -gt 0 ] ; do
	target=`echo $1 | tr '[a-z]' '[A-Z]'`
	ans=`sed -ne "/^$target/s/^$target[ 	]*//p" < $acronyms 2>/dev/null`
	if [ "$ans" != "" ] ; then
		echo "$target: $ans"
	else
		echo "Gee...  I don't know what $1 means..."
		rv=1
	fi
	shift
done
exit $rv