Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jan 2017 18:00:53 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        David Christensen <dpchrist@holgerdanske.com>
Cc:        freebsd-questions@freebsd.org
Subject:   man page text output (was Re: FreeBSD 11.0-RELEASE-p7 i386 system drive imaging and migration)
Message-ID:  <alpine.BSF.2.20.1701301752200.85129@wonkity.com>
In-Reply-To: <b545887a-71f1-c218-c572-7e904ca5a485@holgerdanske.com>
References:  <df0c81d7-fd2b-852f-4007-5fb4b24100e0@holgerdanske.com> <alpine.BSF.2.20.1701290622500.13432@wonkity.com> <516b147d-6faa-b9c0-1d8f-2313a0755211@holgerdanske.com> <alpine.BSF.2.20.1701292206450.71961@wonkity.com> <3f6c8bfb-70a4-74c2-3879-b328ecd3bb38@holgerdanske.com> <alpine.BSF.2.20.1701300816340.85129@wonkity.com> <b545887a-71f1-c218-c572-7e904ca5a485@holgerdanske.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 30 Jan 2017, David Christensen wrote:
>> 
>> Sure, there are control characters mixed in with the output. Easier to
>> search in the pager, but this will work:
>>
>>   man rc.conf | col -b | grep ifconfig_DEFAULT
>
> Okay.
>
>
> 'man' is interleaving control characters to underline 'ifconfig_D' when 
> output is to STDOUT or to $PAGER:

Yes.  It has been doing that since the days of actual TTYs, since that 
was how they underlined.

> Is there a way (environment variable, alias) to filter 'man' output through 
> 'col -b' when output is to STDOUT (rather than $PAGER)?

Probably, although offhand after a long day, I'm not thinking of a 
short, clever way.

It used to be possible to generate "ascii" outpu with groff.  Now we 
have mandoc, which can surely do it, but I don't see how:

   mandoc -T ascii rc.conf
   mandoc: rc.conf: ERROR: No such file or directory

It might just be a missing MANPATH setting, I don't know. I'm also not 
sure whether "ascii" output included the control characters.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1701301752200.85129>