FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 03-25-2009, 09:44 PM
Grant Edwards
 
Default How to get plain ascii from "man"?

On 2009-03-25, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
> On Wed, Mar 25, 2009 at 5:12 PM, Grant Edwards <grante@visi.com> wrote:
>> How do you get a plain ascii file (no backspacing, no escape
>> sequences) out of "man"? Running it through col or colcrt
>> doesn't work anymore, because the default output contains ANSI
>> color escape sequences.
>>
>> grotty apparently outputs ANSI color escape sequences
>> regardless of whether or not the output is a tty and regardless
>> of the TERM setting.
>>
>> Who decided that everyting in the friggin' world was an ANSI
>> color crt even if it's not a tty and TERM isn't set?
>
> Edit /etc/man.conf and add -c to the commandline for TROFF,
> NROFF and JNROFF. Then "man program | col -bf" or your method
> of choice should work. There is a note in the man.conf
> comments about it.

That didn't work for me. Does it work for you?

I also tried manually running groff using the -c flag, and that
didn't work either.

[Actually, I didn't edit /etc/man.conf -- I copied it somewhere
else and edited that file, then pointed man to the modified
file using the -C option.]

--
Grant Edwards grante Yow! I would like to
at urinate in an OVULAR,
visi.com porcelain pool --
 
Old 03-25-2009, 09:44 PM
Grant Edwards
 
Default How to get plain ascii from "man"?

On 2009-03-25, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
> On Wed, Mar 25, 2009 at 5:12 PM, Grant Edwards <grante@visi.com> wrote:
>> How do you get a plain ascii file (no backspacing, no escape
>> sequences) out of "man"? Running it through col or colcrt
>> doesn't work anymore, because the default output contains ANSI
>> color escape sequences.
>>
>> grotty apparently outputs ANSI color escape sequences
>> regardless of whether or not the output is a tty and regardless
>> of the TERM setting.
>>
>> Who decided that everyting in the friggin' world was an ANSI
>> color crt even if it's not a tty and TERM isn't set?
>
> Edit /etc/man.conf and add -c to the commandline for TROFF,
> NROFF and JNROFF. Then "man program | col -bf" or your method
> of choice should work. There is a note in the man.conf
> comments about it.

That didn't work for me. Does it work for you?

I also tried manually running groff using the -c flag, and that
didn't work either.

[Actually, I didn't edit /etc/man.conf -- I copied it somewhere
else and edited that file, then pointed man to the modified
file using the -C option.]

--
Grant Edwards grante Yow! I would like to
at urinate in an OVULAR,
visi.com porcelain pool --
 
Old 03-25-2009, 10:01 PM
Paul Hartman
 
Default How to get plain ascii from "man"?

On Wed, Mar 25, 2009 at 5:44 PM, Grant Edwards <grante@visi.com> wrote:
> On 2009-03-25, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
>> On Wed, Mar 25, 2009 at 5:12 PM, Grant Edwards <grante@visi.com> wrote:
>>> How do you get a plain ascii file (no backspacing, no escape
>>> sequences) out of "man"? Running it through col or colcrt
>>> doesn't work anymore, because the default output contains ANSI
>>> color escape sequences.
>>>
>>> grotty apparently outputs ANSI color escape sequences
>>> regardless of whether or not the output is a tty and regardless
>>> of the TERM setting.
>>>
>>> Who decided that everyting in the friggin' world was an ANSI
>>> color crt even if it's not a tty and TERM isn't set?
>>
>> Edit /etc/man.conf and add -c to the commandline for TROFF,
>> NROFF and JNROFF. Then "man program | col -bf" or your method
>> of choice should work. There is a note in the man.conf
>> comments about it.
>
> That didn't work for me. Does it work for you?
>
> I also tried manually running groff using the -c flag, and that
> didn't work either.
>
> [Actually, I didn't edit /etc/man.conf -- I copied it somewhere
> else and edited that file, then pointed man to the modified
> file using the -C option.]

Yes, it works for me. Without the -c option it put partial ANSI codes
all over, but with the -c added to man.conf piping it through col -bf
produces clean plain text output.
 
Old 03-25-2009, 10:01 PM
Paul Hartman
 
Default How to get plain ascii from "man"?

On Wed, Mar 25, 2009 at 5:44 PM, Grant Edwards <grante@visi.com> wrote:
> On 2009-03-25, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
>> On Wed, Mar 25, 2009 at 5:12 PM, Grant Edwards <grante@visi.com> wrote:
>>> How do you get a plain ascii file (no backspacing, no escape
>>> sequences) out of "man"? Running it through col or colcrt
>>> doesn't work anymore, because the default output contains ANSI
>>> color escape sequences.
>>>
>>> grotty apparently outputs ANSI color escape sequences
>>> regardless of whether or not the output is a tty and regardless
>>> of the TERM setting.
>>>
>>> Who decided that everyting in the friggin' world was an ANSI
>>> color crt even if it's not a tty and TERM isn't set?
>>
>> Edit /etc/man.conf and add -c to the commandline for TROFF,
>> NROFF and JNROFF. Then "man program | col -bf" or your method
>> of choice should work. There is a note in the man.conf
>> comments about it.
>
> That didn't work for me. Does it work for you?
>
> I also tried manually running groff using the -c flag, and that
> didn't work either.
>
> [Actually, I didn't edit /etc/man.conf -- I copied it somewhere
> else and edited that file, then pointed man to the modified
> file using the -C option.]

Yes, it works for me. Without the -c option it put partial ANSI codes
all over, but with the -c added to man.conf piping it through col -bf
produces clean plain text output.
 

Thread Tools




All times are GMT. The time now is 05:51 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org