Solved

Print man pages

Posted on 2003-11-24
7
580 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
7 Comments
 
LVL 61

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

914 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now