Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site godot.UUCP Path: utzoo!linus!decvax!cca!godot!bruce From: bruce@godot.UUCP (Bruce Nemnich) Newsgroups: net.bugs.4bsd Subject: /usr/lib/makewhatis fix (catman(8)) Message-ID: <148@godot.UUCP> Date: Sat, 30-Jun-84 00:50:33 EDT Article-I.D.: godot.148 Posted: Sat Jun 30 00:50:33 1984 Date-Received: Sun, 1-Jul-84 00:31:11 EDT Organization: Thinking Machines, Waltham, MA Lines: 32 I had a problem here with with /usr/lib/makewhatis (invoked by catman(8)); ed would run out of buffer space and bomb. Just change the ed script to a sed script (I also rm the other /tmp file it creates): 1c1 < rm -f /tmp/whatis /tmp/whatis$$ --- > rm -f /tmp/whatis /tmp/whatis2 /tmp/whatis$$ 9,17c9,14 < ed - /tmp/whatis <<\! < g/\\-/s//-/ < g/\\\*-/s//-/ < g/ VAX-11/s/// < 1,$s/.TH [^ ]* \([^ ]*\).* \([^-]*\)/\2(\1) / < g/ /s// /g < w /tmp/whatis2 < q < ! --- > sed -e 's/\\-/-/' \ > -e 's/\\\*-/-/' \ > -e 's/ VAX-11//' \ > -e 's/.TH [^ ]* \([^ ]*\).* \([^-]*\)/\2(\1) /' \ > -e 's/ / /g' \ > /tmp/whatis >/tmp/whatis2 21c18 < rm -f /tmp/whatis /tmp/whatis$$ --- > rm -f /tmp/whatis /tmp/whatis2 /tmp/whatis$$ -- --Bruce Nemnich, Thinking Machines Corporation, Waltham, MA {astrovax,cca,escher,ihnp4,ima,mit-eddie,...}!godot!bruce, BJN@MIT-MC.ARPA