How to print (part of) a man page

manprinting

The question is: how do you print only part of a man page?

Currently I do zcat manpage.1.gz | vim - and just remove everything I don't want to print. Then I pass that through groff and lpr. Are there better methods?

Best Answer

If you want to easily print a man doc I usually do it the graphical way:

man -Hfirefox command

Then you can print certain pages in your web browser. This isn't as powerful as doing it through the command line but it's a lot easier to get right since you can actually see what you're printing ahead of time. This may be important if you want to print a landscape document or something of that sort.

Related Question