1 |
On Wed, Mar 25, 2009 at 5:44 PM, Grant Edwards <grante@××××.com> wrote: |
2 |
> On 2009-03-25, Paul Hartman <paul.hartman+gentoo@×××××.com> wrote: |
3 |
>> On Wed, Mar 25, 2009 at 5:12 PM, Grant Edwards <grante@××××.com> wrote: |
4 |
>>> How do you get a plain ascii file (no backspacing, no escape |
5 |
>>> sequences) out of "man"? Running it through col or colcrt |
6 |
>>> doesn't work anymore, because the default output contains ANSI |
7 |
>>> color escape sequences. |
8 |
>>> |
9 |
>>> grotty apparently outputs ANSI color escape sequences |
10 |
>>> regardless of whether or not the output is a tty and regardless |
11 |
>>> of the TERM setting. |
12 |
>>> |
13 |
>>> Who decided that everyting in the friggin' world was an ANSI |
14 |
>>> color crt even if it's not a tty and TERM isn't set? |
15 |
>> |
16 |
>> Edit /etc/man.conf and add -c to the commandline for TROFF, |
17 |
>> NROFF and JNROFF. Then "man program | col -bf" or your method |
18 |
>> of choice should work. There is a note in the man.conf |
19 |
>> comments about it. |
20 |
> |
21 |
> That didn't work for me. Does it work for you? |
22 |
> |
23 |
> I also tried manually running groff using the -c flag, and that |
24 |
> didn't work either. |
25 |
> |
26 |
> [Actually, I didn't edit /etc/man.conf -- I copied it somewhere |
27 |
> else and edited that file, then pointed man to the modified |
28 |
> file using the -C option.] |
29 |
|
30 |
Yes, it works for me. Without the -c option it put partial ANSI codes |
31 |
all over, but with the -c added to man.conf piping it through col -bf |
32 |
produces clean plain text output. |