Annotation of researchv10dc/man/index/lookman, revision 1.1

1.1     ! root        1: #!/usr/bin/rc
        !             2: # Usage: lookman key ...
        !             3: #      prints out the names of all manual pages containing all the given keywords
        !             4: index=/n/bowell/usr/man/index/index
        !             5: t1=/tmp/look1.$pid
        !             6: t2=/tmp/look2.$pid
        !             7: fn sigexit sigint sighup sigterm{
        !             8:        rm -f $t1 $t2
        !             9:        exit 1
        !            10: }
        !            11: *=`{echo $*|tr A-Z a-z|tr -dc 'a-z \012'}      # fold case, delete funny chars
        !            12: if(~ $#* 0){
        !            13:        echo Usage: $0 key ... >/dev/stderr
        !            14:        exit 1
        !            15: }
        !            16: look $1 $index|sed 's/.*       //'|sort -u >$t1
        !            17: shift
        !            18: for(i in $*){
        !            19:        look $i $index|sed 's/.*        //'|sort -u|comm -12 - $t1 >$t2
        !            20:        mv $t2 $t1
        !            21: }
        !            22: sort $t1
        !            23: rm -f $t1 $t2
        !            24: exit 0

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.