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

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?
DBA Tips Data Pump Reference


Post a Comment


dba topics. Copyright 2011-17 All Rights Reserved | Site Map | Contact | Disclaimer | Google