coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature Request - CMP


From: Eric Blake
Subject: Re: Feature Request - CMP
Date: Fri, 06 Feb 2015 10:14:28 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 02/06/2015 10:01 AM, Tyler Beaver wrote:
> If there were an explicit flag, I don't think there would be ambiguity,
> personally speaking. It would still default to octal of course, but if
> there were a --base 0x that you had to explicitly add then you would get
> 0xFF instead of 377. But I also think patching --help and/or man, as well
> as a preceeding 0.

od already has multiple options for specifying the base of the offset
independently from the base of the characters, so there is indeed
precedent (and if we DO enhance cmp, I'd want to use the same short and
long option names of -A/--address-radix for the offset portion, but I'm
not sure what we'd copy for the byte portion, as -t/--format, or even
-b, aren't quite right).

Meanwhile, these days, it's pretty easy to use the shell to convert
between bases (using $(()) converts any base to decimal, and printf
converts decimal to any base), so I'm not sure if it's worth bloating
cmp to have the same flexibility as od.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]