Received: (at submit) by debbugs.gnu.org; 6 Feb 2015 17:12:33 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 06 12:12:33 2015 Received: from localhost ([127.0.0.1]:35828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1YJmSH-0004k8-4u for submit <at> debbugs.gnu.org; Fri, 06 Feb 2015 12:12:33 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52936) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <P@HIDDEN>) id 1YJmSF-0004jt-0G for submit <at> debbugs.gnu.org; Fri, 06 Feb 2015 12:12:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <P@HIDDEN>) id 1YJmS2-0005Ea-Ei for submit <at> debbugs.gnu.org; Fri, 06 Feb 2015 12:12:25 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:34922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <P@HIDDEN>) id 1YJmS2-0005EU-CW for submit <at> debbugs.gnu.org; Fri, 06 Feb 2015 12:12:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <P@HIDDEN>) id 1YJmS1-0000IJ-EW for bug-diffutils@HIDDEN; Fri, 06 Feb 2015 12:12:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <P@HIDDEN>) id 1YJmRx-0005Bw-BA for bug-diffutils@HIDDEN; Fri, 06 Feb 2015 12:12:16 -0500 Received: from mail5.vodafone.ie ([213.233.128.176]:53236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <P@HIDDEN>) id 1YJmRw-00055M-W1; Fri, 06 Feb 2015 12:12:13 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkkFAHX11FRtTrRZ/2dsb2JhbABagwWELcMDgk8CgRlDAQEBAQF9hA0BBSMPAUYQCw0BCgICBRYLAgIJAwIBAgFFBgEMAQcBAYgtAb9ihWmQLAEBAQcBAQEBAR2BIY5XB4JogUEBBJ8bg3GIJiKBfwMcgVA+gnMBAQE Received: from unknown (HELO localhost.localdomain) ([109.78.180.89]) by mail3.vodafone.ie with ESMTP; 06 Feb 2015 17:12:10 +0000 Message-ID: <54D4F5E9.3040909@HIDDEN> Date: Fri, 06 Feb 2015 17:12:09 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@HIDDEN> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Eric Blake <eblake@HIDDEN>, Tyler Beaver <tyler9725@HIDDEN> Subject: Re: Feature Request - CMP References: <CA+Xn=xoTTJ6bX+RTJfc9dLW1CZ2=sHreDwKZmXxOaT2e3viQKA@HIDDEN> <54D4EA6C.40204@HIDDEN> <54D4EF96.2010703@HIDDEN> <54D4F4D5.5020004@HIDDEN> In-Reply-To: <54D4F4D5.5020004@HIDDEN> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: bug-diffutils@HIDDEN, coreutils@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) On 06/02/15 17:07, Eric Blake wrote: > On 02/06/2015 09:45 AM, Eric Blake wrote: >> On 02/06/2015 09:23 AM, Pádraig Brady wrote: >>> On 06/02/15 15:57, Tyler Beaver wrote: >>>> I know this tool is probably note used as much anymore, but perhaps it would be worth adding a flag for overriding the verbose output number system for the values, or at any rate specifying that this output is in octal, and not decimal or hexadecimal. >>> >>> Currently: offsets are decimal, differing bytes are octal: >>> >>> $ cmp -l <(echo 12345678abc) <(echo 12345678bbb) >>> 9 141 142 >>> 11 143 142 > > Another observation: Note that when mixed with --ignore-initial, we > behave as if offsets start from the point where we skipped to, rather > than the beginning of the file. Since -i is not required by POSIX, does > this always make the most sense? > > $ cmp -l <(printf bbc) <(printf abd) > 1 142 141 > 3 143 144 > $ cmp -l -i1 <(printf bbc) <(printf abd) > 2 143 144 > > and what happens when we use the two-offset form? > > $ cmp -l -i2:1 <(printf abcd) <(printf bce) > 2 144 145 > $ cmp -l -i1:2 <(printf bce) <(printf abcd) > 2 145 144 > > >> That said, it might be worth patching 'cmp --help' to make it obvious >> that differing bytes are in octal values. > > That is, instead of > > -l, --verbose output byte numbers and differing byte values > > maybe we could use: > > -l, --verbose for each difference, output the decimal > offset and the differing octal values > > Expanding that to two lines can be offset by compressing elsewhere: > > -i, --ignore-initial=SKIP skip first SKIP bytes of both inputs > -i, --ignore-initial=SKIP1:SKIP2 skip first SKIP1 bytes of FILE1 and > first SKIP2 bytes of FILE2 > > feels long; how about: > > -i, --ignore-initial=SKIP[:SKIP2] bypass SKIP bytes of FILE1, and > SKIP2 (default SKIP) bytes of FILE2 Good suggestions, which I've CC'd the the appropriate list ;) cheers, Pádraig.
Pádraig Brady <P@HIDDEN>
:bug-diffutils@HIDDEN
.
Full text available.bug-diffutils@HIDDEN
:bug#19794
; Package diffutils
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.