Man pages?

Andy Peterman andyp at treehouse.UUCP
Tue Aug 21 13:03:04 AEST 1990


In article <SHAFF.90Aug20153725 at neon.elements.rpal.com> shaff at rpal.com writes:
>Sometime back I posted a message regarding the updating of the database file
>/usr/lib/whatis.  Not one answer (though there were several people who wanted
>the information to be passed their way if I got any pointers).  Is there really
>no one out there who has successfully gotten the whatis database to include new
>man pages?

The biggest problem with this is you first need to unpack each man page
and then you need to extact the line following the NAME line.  If you
think this is simple, do a 'cat -v /usr/catman/u_man/man1/users.1' for
an example of some of the hidden characters in a man page.  I think the
multiple characters and backspaces are because nroff thinks you're
printing this on a printer and wants 'NAME' to be bold.  I wish the
manual pages, which are normally just displayed on a CRT, were a little
more efficient (the limitations of nroff, I guess!).

>Further, I have come to a realization that I can not find any documentation on
>adding man pages with regards to compaction, etc.  (No, we have not gotten our
>stand-alone documents yet, so I can not read the manual)

I've created a simple script, called makeman, that will nroff and pack
the manual page.  The syntax is 'makeman <filename>' where <filename> is
an nroff manual document of the form xxx.[1-8]:

#!/bin/sh
#
if [ "$1" != "" ]; then
        nroff -man $1 > tmp
        mv tmp $1
        pack $1
fi

After running the script, move the file (now of the form xxx.[1-8].z) to
the correct u_man or a_man subdirectory.  Make sure its permission allows
reading by everyone.

	Andy Peterman
	treehouse!andyp at gvgpsa.gvg.tek.com



More information about the Comp.unix.aux mailing list