FreeBSD 11.0-RELEASE-p7 i386 system drive imaging and migration
David Christensen
dpchrist at holgerdanske.com
Mon Jan 30 19:30:46 UTC 2017
On 01/30/17 07:27, Warren Block wrote:
> On Sun, 29 Jan 2017, David Christensen wrote:
>
>> On 01/29/17 21:18, Warren Block wrote:
>>> On Sun, 29 Jan 2017, David Christensen wrote:
>>>
>>>> On 01/29/17 05:27, Warren Block wrote:
>>>>> On Sat, 28 Jan 2017, David Christensen wrote:
>> I manually selected MBR partitioning scheme in the installer, as I
>> have machines going back to Pentium 4's and I want something that will
>> work on all of them.
>
> GPT will work on them, that is part of the function of the PMBR.
Okay. Maybe next time.
>>> setenv PAGER less
>>> man rc.conf
>>> Type
>>> /ifconfig_DEFAULT
>>> and press Enter.
>>
>> Yes, I tried that. Interactive use:
>>
>> Pattern not found (press RETURN)
>
> It is case sensitive. Otherwise, don't know, it is found here.
My bad. Fix:
dpchrist at freebsd:/usr/home/dpchrist/home $ cvs diff
Index: .profile
===================================================================
RCS file: /cvs/dpchrist/home/.profile,v
retrieving revision 1.5
diff -r1.5 .profile
6c6
< export PAGER=less;
---
> export PAGER='less -I';
Index: .shrc
===================================================================
RCS file: /cvs/dpchrist/home/.shrc,v
retrieving revision 1.2
diff -r1.2 .shrc
8a9
> alias less='less -I'
>> grep'ing the man page:
>>
>> dpchrist at freebsd:/usr/home/dpchrist $ man rc.conf | grep ifconfig_DEFAULT
>> <nothing>
>
> 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:
dpchrist at freebsd:/usr/home/dpchrist $ man rc.conf | egrep
'i..f..c..o..n..f..i..g.._..D'| dump
00000000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |
|
00000010 20 76 61 72 69 61 62 6c 65 20 5f 08 69 5f 08 66 | variable
_.i_.f|
00000020 5f 08 63 5f 08 6f 5f 08 6e 5f 08 66 5f 08 69 5f
|_.c_.o_.n_.f_.i_|
00000030 08 67 5f 08 5f 5f 08 44 5f 08 45 5f 08 46 5f 08
|.g_.__.D_.E_.F_.|
00000040 41 5f 08 55 5f 08 4c 5f 08 54 20 6d 61 79 20 62 |A_.U_.L_.T
may b|
00000050 65 20 63 6f 6e 66 69 67 75 72 65 64 2e 20 20 49 |e
configured. I|
00000060 74 20 77 69 6c 6c 20 62 65 20 75 73 65 64 0a |t will be
used.|
0000006f
'col -b' converts char1-backspace-char2 sequences to char2:
dpchrist at freebsd:/usr/home/dpchrist $ man rc.conf | col -b | egrep
'ifconfig_D'| dump
00000000 09 09 20 76 61 72 69 61 62 6c 65 20 69 66 63 6f |.. variable
ifco|
00000010 6e 66 69 67 5f 44 45 46 41 55 4c 54 20 6d 61 79
|nfig_DEFAULT may|
00000020 20 62 65 20 63 6f 6e 66 69 67 75 72 65 64 2e 20 | be
configured. |
00000030 20 49 74 20 77 69 6c 6c 20 62 65 20 75 73 65 64 | It will be
used|
00000040 0a |.|
00000041
Is there a way (environment variable, alias) to filter 'man' output
through 'col -b' when output is to STDOUT (rather than $PAGER)?
David
More information about the freebsd-questions
mailing list