2 # Usage: lookman key ...
3 # prints out the names of all manual pages containing all the given keywords
5 index=/sys/lib/man/lookman/index
12 fn sigint sighup sigterm {
17 *=`{echo $*|tr A-Z a-z|tr -dc 'a-z0-9_. \012'} # fold case, delete funny chars
19 echo Usage: lookman key ... >/fd/2
22 look $1 $index | sed 's/.* //' | sort -u >$t1
25 look $i $index | sed 's/.* //' | sort -u |
27 while (getline < "'$t1'" > 0)
30 { if (table[$0]) print }
34 sort $t1 | sed 's;/sys/man/;;
35 s;(.*)/(.*);man \1 \2 # \2(\1);'