Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Print man pages

Posted on 2003-11-24
7
Medium Priority
?
594 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 80 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 200 total points
ID: 9815456
0
 
LVL 38

Accepted Solution

by:
yuzh earned 400 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
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…
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.
Suggested Courses

715 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