#!/bin/rc

dbfile=$home/lib/acronyms*
ifs='
'

fn usage{
	echo usage: 'wtf [-f dbfile] [is] <acronym>' >[1=2]
	exit 1
}

if(~ $1 -f){
	dbfile=$2
	shift 2
}

if(~ $1 is)
	shift

if(~ $#* 0 || ~ $1 -*)
	usage

while(! ~ $#* 0){
	acronym=`{echo -n $1 |tr 'a-z' 'A-Z'}
	answer=`{grep -h '^'$"acronym'	' $dbfile}
	if(~ $#answer 0) 
		echo $1: nothing appropriate
	if not
		for(i in $answer)
			echo -n $i |sed 's/^'$acronym'/&:/g'
	shift
}
