Indexed man pages

by groleo

why not index ,somehow, the Unix man pages ?

I googled a bit and found swish.

It’s a neat tool, that can index mp3(id3), html/xml, mail, rtf, latex and (drum roll please) manual pages(nroff).
So I installed it on my ubuntu:

sudo apt-get install swish++

then made up a quick config.
NOTE: run as user to avoid any problems.

cd ~
cp /usr/share/doc/swish++/examples/swish++.conf.gz .
gunzip swish++.conf.gz
mkdir /tmp/tmpswish/
joe swish++.conf

Now, be sure to uncomment the lines

 95 IncludeMeta             author bugs caveats description diagnostics environment
 96 IncludeMeta             errors examples exit-status files history name notes
 97 IncludeMeta             options return-value see-also synopsis warnings
...
194 FilterFile *.bz2        bunzip2 -c %f > @%F
195 FilterFile *.gz         gunzip -c %f > /tmp/tmpswish/@%B
196 FilterFile *.Z          uncompress -c %f > @%F
...
222 IncludeFile Man *.[1-9n] *.[1-9][a-z]
index++   -e "man:*.gz" /usr/share/man
index++   -e "man:*" /tmp/tmpswish
rm -rf /tmp/tmpswish

now, let’s search for SO_REUSEADDR

user ~ > search++ SO_REUSEADDR
# results: 3
99 /tmp/tmpswish//socket.7 18753 socket.7
57 /tmp/tmpswish//ip.7 28366 ip - Linux IPv4 protocol implementation
6 /tmp/tmpswish//smb.conf.5 287447 smb.conf.5

All you have to do now, is
 man 7 socket
Advertisements