Hi! try the following command:
man command_to_man | col -b > file.txt
Hope this helps.
On Mon, 28 Sep 1998, Glynn Clements wrote:
#
#Tuukka Toivonen 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.
#
#Dunno, but if you find out, let me know :)
#
#> >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".
#
#It does.
#
#> 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...
#
#`col -b' will do this, and some other things besides.
#
#--
#Glynn Clements <[EMAIL PROTECTED]>
#
________________________________
Goh Sek Chye
SingNet Network Operation Centre
-------------------------------------------------------------------
PGP Public Key: finger [EMAIL PROTECTED]
Key fingerprint = 55 9E FF EA 4D A7 33 25 03 00 3E BF A2 F3 AF 6A
-------------------------------------------------------------------