You are here
Home > Redhat > Unix Tips

Unix Tips

http://faq.programmerworld.net/networking/unix-interview-questions-answers.html
manunix_command | col -bx> man_page_file.txt

Unix, how do I convert a manual page into a simple text file?
In Unix, the manual page sources are meant for conversion to a format compatible with various types of terminals, typesetters, or PostScript printers. Formatted manual pages contain control characters that produce underlining and boldface text (which is compatible with most terminals and printers).

If you wish to convert a man page to a normal text file, or if you need to output the manual to a device that doesn't support these codes (e.g., a simple line printer), try the following. From the Unix prompt, enter: man unix_command | col -bx> man_page_file.txt Replace unix_command with the relevant command. The col command strips out the backspace-underline and backspace-letter sequences, so you should be able to print or otherwise manipulate man_page_file.txt like any other ASCII text file.

Leave a Reply

three × four =

Top