Enter your Email


BTOI | © copyight


Dec 28, 2008
Easily convert man pages to text documents

Have you ever wanted to convert a man page into a plain text document?

 

We can do this, when we want to share information via an email or other document format.

 

1) Here's the wrong way to write the man page for the ls command into a text file named ls.bad:

 

     man ls > ls.bad

 

This keeps all of the formatting characters in your document, which is generally not what you want. 

 

2) Here's a better way that eliminates those formatting characters:

 

     man ls | col -b > man.txt

 

The col command with the -b option removes the undesirable backspace characters from the text stream, so the only thing left in your document is the text you want, in the format you want.

0 Comments:

Post a Comment

<< Home