Solved

Print man pages

Posted on 2003-11-24
7
591 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

Industry Leaders: 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

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…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

756 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