Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Convert 'man' pages to text files UNIX
I can't really take credit for this as it came straight from the Unix Guru Universe Tip of the Day (subscribe). To save a copy of any man page to text simply type:
man command_name | col  -b > output_file_name
For example:
man grep | col -b > grep.txt
This can be especially useful for larger man pages (tcsh, for example), as you can now open and work with the text file in any GUI text editor.
    •    
  • Currently 3.00 / 5
  You rated: 5 / 5 (5 votes cast)
 
[6,877 views]  

Convert 'man' pages to text files | 5 comments | Create New Account
Click here to return to the 'Convert 'man' pages to text files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
email yourself man pages
Authored by: willie on Apr 08, '02 03:22:22AM

I work at a number of different machines and this way I can easily collect notes and help files in one place on my laptop.

I email man pages (or other files) to myself as notes. For example,

man date | col -b | mail -s'man date' willie

I have a mailbox for unix hints and any subject that starts with "man " gets filtered to that mailbox on arrival.

On my MacOS X installation I havent had the time to figure out how to enable outbound mail without enabling inbound mail. Any pointers?



[ Reply to This | # ]
email yourself man pages
Authored by: WillyT on Apr 08, '02 10:08:39AM
Here is a thread on the forum that should get you there.

[ Reply to This | # ]
Had to look this up in my library
Authored by: WillyT on Apr 08, '02 10:25:27AM

The April 2002 issue of "Linux Journal" has a really good article on sendmail AND a Mac OS X review! Mostly positive.



[ Reply to This | # ]
Graphical man page programs
Authored by: sjonke on Apr 08, '02 04:28:11PM
There are a variety of graphical man page programs for OS X, several of which offer command-line equivalents and would seem to more than obviate the need for saving mage pages to a text file. See versiontracker. Collect all 5! But I like XManview the best.

[ Reply to This | # ]
Built Alias for This Hint
Authored by: jhaffner on Apr 12, '02 02:20:25PM

I saw this hint on O'Reilly, under their BSD tutorials.

I liked it so much, I added an alias to my .tcshrc file as follows:

alias fman 'man (bs)!* | col -b > /path/for/page/(bs)!*.man'

(bs)= backslash because preview stripped the character out.

The (bs)!* string substitutes your desired command in the alias. So, now when I type 'fman foo' at the prompt, I get a text file named foo.man that I can open with BBEdit.



[ Reply to This | # ]