From unknown Wed Jun 18 00:22:39 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#19794 <19794@debbugs.gnu.org> To: bug#19794 <19794@debbugs.gnu.org> Subject: Status: Feature Request - CMP Reply-To: bug#19794 <19794@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:22:39 +0000 retitle 19794 Feature Request - CMP reassign 19794 diffutils submitter 19794 P=C3=A1draig Brady severity 19794 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 06 12:12:33 2015 Received: (at submit) by debbugs.gnu.org; 6 Feb 2015 17:12:33 +0000 Received: from localhost ([127.0.0.1]:35828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YJmSH-0004k8-4u for submit@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 ) id 1YJmSF-0004jt-0G for submit@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 ) id 1YJmS2-0005Ea-Ei for submit@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 ) id 1YJmS2-0005EU-CW for submit@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 ) id 1YJmS1-0000IJ-EW for bug-diffutils@gnu.org; Fri, 06 Feb 2015 12:12:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJmRx-0005Bw-BA for bug-diffutils@gnu.org; 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 ) 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@draigBrady.com> Date: Fri, 06 Feb 2015 17:12:09 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= 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 , Tyler Beaver Subject: Re: Feature Request - CMP References: <54D4EA6C.40204@draigBrady.com> <54D4EF96.2010703@redhat.com> <54D4F4D5.5020004@redhat.com> In-Reply-To: <54D4F4D5.5020004@redhat.com> 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@gnu.org, coreutils@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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.