*BSD News Article 7153


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!uunet!psgrain!ee.und.ac.za!ucthpx!casper.cs.uct.ac.za!Grondar.its.uct.ac.za!murray
From: murray@its.uct.ac.za (Mark Murray)
Subject: Fix for whatis.db database.
Message-ID: <murray.3.720285489@its.uct.ac.za>
Keywords: man whatis apropos patch
Lines: 46
Sender: news@casper.cs.uct.ac.za (news)
Organization: University of Cape Town
Date: Wed, 28 Oct 1992 15:18:09 GMT

Hello, all!

As a proud owner of a 50 MHz 486 with 386BSD, I spend some time makeing the 
system "look pretty".

One thing that bugged me was the whatis.db file format being messed up even 
_after_ the col -b patch. What I found was the section number being replaced 
by garbage.

Lines like this:

(ar) - <description for ar>

or

ar (a) - <description for ar>

This was a minor irritation, so I fixed it.

Here is a patch for the makewhatis.sed file, which sits in the
/usr/share/man directory.

#---- cut here ----
35,36c35,36
< /(\([a-zA-Z0-9]*\).*UNIX Programmer's Manual/ {
< 	s;.*(\([a-zA-Z0-9]*\).*UNIX.*;\1;
---
> /(\([a-zA-Z0-9]*\)/ {
> 	s;.*(\([a-zA-Z0-9]*\).*;\1;
#---- cut here ----

Now do the make makedb and your database lines will look like

ar (1) - <description for ar>

Enjoy!

Mark


--
Mark Murray  (ITS/MURRAY)        \+/ Internet: murray@ucthpx.uct.ac.za
User support services            +X+ Voice:    +27 21 650 3025
Information Technology Services, /+\ This .sig is umop ap!sdn
University of Cape Town, Rondebosch 7700, South Africa