From owner-freebsd-questions@freebsd.org Mon Jan 30 19:30:46 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6531ACC74B2 for ; Mon, 30 Jan 2017 19:30:46 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from holgerdanske.com (holgerdanske.com [184.105.128.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.he.net", Issuer "GeoTrust SSL CA - G4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 542C3333 for ; Mon, 30 Jan 2017 19:30:46 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from ::ffff:99.100.19.101 ([99.100.19.101]) by holgerdanske.com with ESMTPSA (AES128-SHA:SSLv3:Kx=RSA:Au=RSA:Enc=AES(128):Mac=SHA1) (SMTP-AUTH username dpchrist@holgerdanske.com, mechanism PLAIN) for ; Mon, 30 Jan 2017 11:30:32 -0800 Subject: Re: FreeBSD 11.0-RELEASE-p7 i386 system drive imaging and migration To: freebsd-questions@freebsd.org References: <516b147d-6faa-b9c0-1d8f-2313a0755211@holgerdanske.com> <3f6c8bfb-70a4-74c2-3879-b328ecd3bb38@holgerdanske.com> From: David Christensen Message-ID: Date: Mon, 30 Jan 2017 11:30:32 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 19:30:46 -0000 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@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@freebsd:/usr/home/dpchrist $ man rc.conf | grep ifconfig_DEFAULT >> > > 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@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@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