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

advertisements

_____________________________________________________________________________________________________________________

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

where

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
hints

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

tr command is used for translation.

How is it?

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

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)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer