Operating System - HP-UX
1758690 Members
3217 Online
108874 Solutions
New Discussion юеВ

Error of piping file for man command

 
SOLVED
Go to solution
Ngoh Chean Siung
Super Advisor

Error of piping file for man command

Hi,

Normally I will use man command to check for the syntax that I not sure.

But when I key in man lvm > lvm.txt, some of the words inside this lvm.txt file will look strange. Why this problem occurs & is there a way to rectify it?

regards.
6 REPLIES 6
KapilRaj
Honored Contributor

Re: Error of piping file for man command

Even I tried this before but the best way I found is to start logging in your terminal emulator to a text file and then do a man lvm. Stop logging and then view the text page

Regds,

Kaps

Nothing is impossible
Ngoh Chean Siung
Super Advisor

Re: Error of piping file for man command

Hi,

Actually I want to print out the contents of lvm (man lvm). So, I plan to pipe the lvm content into a file and then use FTP to put into my local PC hard disk. Any solution?

regards
Sanjay Yugal Kishore Ha
Frequent Advisor
Solution

Re: Error of piping file for man command

You can try the following-

man lvm | col -b > lvm.txt

On why this occurs-
manpages are normally formatted text written in nroff (or equivalent) format. They have reverse line-feeds and backspaces in them. They have to be removed if plain text is required.

-Sanjay
Dying is the last thing that I will do.
Sanjay Kumar Suri
Honored Contributor

Re: Error of piping file for man command

Thanks Ngoh Chean Siung for this thread. This has answered the question lingering in my mind for ling time.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
rmueller58
Valued Contributor

Re: Error of piping file for man command

why not just print it?

man |lp -d ??
Ngoh Chean Siung
Super Advisor

Re: Error of piping file for man command

Hi,

Actually all the printers that connected to our HP-UX server is dot matrix. So, I plan to ftp the man file into my pc and print it through laser printer.

Anyhow, thanks for your assist.

regards.