How to Open and Save UNIX / Linux man Pages to vi Editor File?



The Eucharistic Miracles of the World

Suppose if you wanted to print the Unix man pages, it has to be copied to a single file. Normally man pages displays page by page. You can easily open the man pages in vi editor using combination following commands.

This command will open the cat command man page in vi editor.

man cat |ul -i|tr '\!' ' ' |vi -

Below command will write the cat command man page to cat.txt file.

man cat |ul -i|tr '\!' ' ' >cat.txt


ul command convert underscore, ^[[1m, ^[(B to readable format. See some examples on ul command below.

$ echo $'h\b_i\b_n\b_t\b_s\b_'

$ echo $'h\b_i\b_n\b_t\b_s\b_' | ul

$ echo $'h\b_i\b_n\b_t\b_s\b_' | ul -i

tr command is used for translation.

How is it?


Website Stats


Post a Comment


Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2) Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer