On Mon, 28 Sep 1998, Glynn Clements wrote:
>Song Lining wrote:
>
>> I just want to know how can I output a manpage to a text format.
>
> man /path/to/file > file.txt
This detects the terminal line width and formats the man page
accordingly, which may be undesired. Is there any way to tell
man how long lines to use? I couldn't find a way when I had
this problem a year or so ago.
>You may wish to filter the output through
>
> sed 's/.^H//g'
I doubt this is enough. Doesn't man write bold letters using
something like this:
b^Hbo^Hol^Hld^Hd
Removing backspaces (^H) from this would lead to
bboolldd
instead of
bold
Hmm. That might even work, if "." means "any char". I should
learn some sed ... :-\
I know I saw some utility which would clean up correctly a file
like this, but I don't remember the program name anymore. Try
searching your man pages...
Also, yesterday I found an rpm package containing program
called "rman" or RosettaMan.
rman can produce ASCII-only, headers-only, TkMan, [tn]roff,
Ensemble, SGML, HTML, LaTeX, RTF from a man page.
btw: this mail should go to linux-admin, no linux-c-programming
mailing list :-/
--
| Tuukka Toivonen <[EMAIL PROTECTED]> [PGP public key
| Homepage: http://www.ee.oulu.fi/~tuukkat/ available]
| Try also finger -l [EMAIL PROTECTED]
| Studying information engineering at the University of Oulu
+-----------------------------------------------------------