Solved

Print man pages

Posted on 2003-11-24
7
593 Views
Last Modified: 2010-08-05
Hi,

   I use "man mkdir | lp" to print the man pages, but the underline becomes control chars. How can I print with correct format?

Thanks.
0
Comment
Question by:richkuan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 62

Assisted Solution

by:gheist
gheist earned 20 total points
ID: 9814727
most likely by reading "man printcap" on screen and adjusting /etc/printcap file accordingly.
if you can share uname -a output from your system and describe your printer make and model, I can give more detailed instructions.
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9815421
basically u need groff.
try man groff.
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9815438
'man -Tps <manpage>' will cause it to be output as postscript, with
the formatting intact.
but these command depends on system to system.

so try one of these out.
man -a make |col -b >make.lst
man -t make | lpr

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 24

Expert Comment

by:shivsa
ID: 9815449
man -t man | lpr
0
 
LVL 24

Assisted Solution

by:shivsa
shivsa earned 50 total points
ID: 9815456
0
 
LVL 38

Accepted Solution

by:
yuzh earned 100 total points
ID: 9815833
To print out a Unix manual page, use this command:

man  commandname   |   col   -b   |   ul   -t   dumb   |   lpr  -Pprinter

where commandname is the name of the manual page, e.g., lpr, and printer is the name of the printer queue
0
 

Author Comment

by:richkuan
ID: 9817614
Thanks for all the replies. I have increased the point to 160.
Yuzh, your approach is the best. You get 100.
Shivsa, thanks for your info. It's very helpful. 50.
Gheist, thanks for your time. 10.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machineā€¦
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consolā€¦
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question