BSD 2 development
[unix-history] / src / makewhatis.sh
CommitLineData
061e5cc5
BJ
1# makewhatis
2# (c) 1979 Regents of the University of California
3rm -f /tmp/whatis
4cd /usr/man
5foreach i ( man1 man2 man3 man4 man5 man6 man7 man8 manu manp )
6 cd $i
7 /usr/ucb/getNAME *.* >> /tmp/whatis
8 cd ..
9end
10ed - /tmp/whatis <<'EOF'
11g/\\-/s//-/
12g/\\\*-/s//-/
13g/ VAX-11/s///
141,$s/...[^ ]* \([^ ][^ ]*\) * \([^-]*\)/\2(\1) /
15g/ /s// /g
16w /tmp/whatis2
17'EOF'
18/usr/ucb/expand -24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100 /tmp/whatis2 | sort >/usr/lib/whatis
19rm /tmp/whatis