blob: c4a0d893c5677751fb6181ee3dd29c30941b3543 (
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
31
32
33
34
35
36
|
#!/bin/sh
#
# $NetBSD: wtf,v 1.4 1999/07/27 15:41:27 drochner Exp $
#
# Public domain
#
acronyms=${ACRONYMDB:-/usr/share/misc/acronyms}
if [ X"$1" = X"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[[:space:]]/s/^$target[[:space:]]*//p" \
< $acronyms 2>/dev/null`
if [ "$ans" != "" ] ; then
echo "$target: $ans"
else
ans=`whatis $1 2> /dev/null | egrep "^$1[, ]" 2> /dev/null`
if [ $? -eq 0 ] ; then
echo "$1: $ans"
else
echo "Gee... I don't know what $1 means..."
rv=1
fi
fi
shift
done
exit $rv
|