Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site umcp-cs.UUCP Path: utzoo!linus!decvax!harpo!gummo!whuxle!pyuxll!eisx!npoiv!npois!hogpc!drux3!ihnp4!zehntel!hplabs!hao!seismo!rlgvax!cvl!umcp-cs!israel From: israel@umcp-cs.UUCP Newsgroups: net.unix-wizards Subject: the 'man' command Message-ID: <3048@umcp-cs.UUCP> Date: Sat, 8-Oct-83 01:10:58 EDT Article-I.D.: umcp-cs.3048 Posted: Sat Oct 8 01:10:58 1983 Date-Received: Wed, 12-Oct-83 12:44:14 EDT Organization: Univ. of Maryland, Computer Science Dept. Lines: 25 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 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 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 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@Udel-Relay (Arpanet)