Adam Thornton writes:
> On Aug 14, 2008, at 7:08 PM, Thomas Kern wrote:
> 
> >When CMS HELP first came out, the group I was with built a process  
> >to format and print all of the Help files into our own books. It  
> >would be nice if there was a process to format and print all of the  
> >MAN pages that are resident on an arbitrary linux system (z or x86).
> 
> for i in $(find /usr/share/man/man*) -name \*gz; do
>     gzip -dc $i | nroff | lpr
> done
> 
> No, don't actually do this.
> 
> You will be sorry.

You at least want "nroff -mandoc" to pickup the roff macros used for
man pages. However, for man pages that you do want to print out, I'd
suggest using "man -t foo" which typesets it into proper PostScript
to stdout. It can be printed to a PostScript-aware printer:
        man -t foo | lpr -Pwherever
or saved and converted to PDF (if ghostscript is installed):
        man -t foo > foo.ps
        ps2pdf foo.ps
(produces foo.pdf). On my PC here there are over 12000 man pages,
most of which typeset to more than one page and many of which
typeset to considerably more (the largest seeming to be perltoc at
197 pages and gcc at 148 pages). As you say, printing out the whole
lot is not something one should do lightly.

--Malcolm

-- 
Malcolm Beattie
System z SWG/STG, Europe
IBM UK

Reply via email to