Aittvax.202 net.news utzoo!decvax!ittvax!swatt Thu Jan 21 09:52:08 1982 Automated USENET Directory Okay, here's my entry in the contest: cat >uuinfo < '@@@' : '/********************************************************************* program: uuinfo description: Print information about UNIX systems on UUCP network programmer: Alan S. Watt Sccsid=@W@ usage: uuinfo systemname [ ... ] arguments: -list List all systems for which a description exsits -grep pattern -grepl pattern List all systems whose description contains -grepp pattern Print all system discriptions mentioning history: 01/11/82 original version *********************************************************************/' USAGE='uuinfo [option] system ... Options are: -list List all systems for which a description exsits -grep pattern -grepl pattern List all systems whose description contains -grepp pattern Print all system discriptions mentioning ' PRINT="more -d" uuinfodir=/usr/lib/uucp/info cd $uuinfodir case $# in 0) echo "usage: $USAGE" echo "Information is available on the following systems:" ls ; exit ;; esac while : do case $# in 0) break ;; esac system=$1 case $system in -list) echo "Information is available on the following systems:" ls ; exit ;; -grepl|-grep)\ echo "Systems mentioning keyword $2 are:" grep -li "$2" * ; exit ;; -grepp) list=`grep -li "$2" *` case $list in '') echo "No systems mention keyword $2" ; exit ;; esac echo "Systems mentioning keyword $2 are: $list" $PRINT $list ; exit ;; esac if [ -f $system ] then $PRINT $system else echo "No description for system $system" fi shift done @@@