the 'man' command

israel at umcp-cs.UUCP israel at umcp-cs.UUCP
Sat Oct 8 15:10:58 AEST 1983


I was checking the performance of an 'emacs' interface to the 'man'
command on our 4.1 bsd system, and I found something funny.

When 'man' is run normally, the first thing it does (after finding
the appropriate command and volume) is to see if it has already been
formatted in a /usr/man/cat<n> directory.  If so, it will use that
version instead of nroff'ing it, and pipe it thru 'more'.  If there
isn't one, or it's not up-to-date, it will make the formatted version.

However, I found by experimentation, (and confirmed it by examining
the code) that if the standard out of the man command is not a
teletype, but instead a file or pipe, not only does it skip piping
the output thru more (as one would expect it to) but it also skips
the check for the /usr/man/cat<n> file, and always nroff's the
source text.  In addition, it sends the output to its standard out,
but does not create or update the /usr/man/cat<n> file.

Does anyone know if there is some rational explanation for why it
does this, or has someone made the (probably fairly simple)
modifications for it to behave rationally?
-- 

~~~ Bruce ~~~
Computer Science Dept., University of Maryland
{rlgvax,seismo}!umcp-cs!israel (Usenet)    israel.umcp-cs at Udel-Relay (Arpanet)



More information about the Comp.unix.wizards mailing list