Aittvax.202 net.news utcsrgv!utzoo!decvax!ittvax!swatt Thu Jan 21 09:52:08 1982 Automated USENET Directory Okay, here's my entry in the contest: cat >uuinfo -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 @@@ ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.