Wednesday, January 14, 2009
If we try normal bash redirection to redirect a man page to a file, the output file will produce many unreadable** characters.
So in order to redirect we need to use col command (which filter reverse line feeds from input)
$ man ls | col -bx > /tmp/ls.man
col - filter reverse line feeds from input
-b Do not output any backspaces, printing only the last character written to each column position.
-x Output multiple spaces instead of tabs.
** In my Ubuntu 7.10, normal redirection of man pages work fine, but in my debian 3.0 desktop, or in the cygwin shell, normal redirection does not work.
- How to open man pages in vi editor - Linux
- Redirect top command output to a file
© Jadu Saikia www.UNIXCL.com