Solved

Print man pages

Posted on 2003-11-24
7
578 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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.

757 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

22 Experts available now in Live!

Get 1:1 Help Now