mkindex 306 B

123456789101112
  1. #!/bin/rc
  2. # creates the index used by lookman
  3. >index
  4. for(i in /sys/man/[0-9]*/[a-z0-9:]*){
  5. p=`{echo $i | sed 's@/sys/man/\([^ ]\)/\([^ ]*\)$@\2(\1)@'}
  6. deroff -w_ < $i |
  7. tr 'A-Z' 'a-z' |
  8. sort -u |
  9. comm -23 - junkwords |
  10. sed 's@$@ '$p'@' >>index # stick file name on end of line
  11. }
  12. sort -o index index