GNU bug report logs - #20745
sort: add options to sort by IPv4/IPv6

Previous Next

Package: coreutils;

Reported by: "Silverman, Jeffrey X. -ND" <Jeffrey.X.Silverman.-ND <at> disney.com>

Date: Fri, 5 Jun 2015 17:32:01 UTC

Severity: wishlist

Full log


Message #14 received at 20745 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: "Silverman, Jeffrey X. -ND" <Jeffrey.X.Silverman.-ND <at> disney.com>,
 Pádraig Brady <P <at> draigBrady.com>,
 "20745 <at> debbugs.gnu.org" <20745 <at> debbugs.gnu.org>
Subject: Re: bug#20745: I would like to make a request for the sort command
Date: Fri, 05 Jun 2015 13:57:33 -0600
[Message part 1 (text/plain, inline)]
On 06/05/2015 01:35 PM, Silverman, Jeffrey X. -ND wrote:
>> This was previously discussed, and while has merit
>> at the time it was thought not important enough to add:
>>
>>  http://www.gnu.org/software/coreutils/rejected_requests.html
>>    http://lists.gnu.org/archive/html/coreutils/2011-06/msg00082.html
>>

> 
> I would like to join the debate.  Would you entertain that, or is the
> issue settled.
> 
> If I wrote the code, would you include it?

Patches certainly speak louder than words.  Last time it was discussed
it appears the biggest category of response could probably be
categorized as "I don't need sorted IP addresses, so I won't spend time
writing the patch", rather than "it's a lousy idea that no one should
implement".  So yes, feel free to propose it as a patch, along with
justification on why people want sorted IP addresses.

You'll need to have copyright assignment on file with the FSF before we
can take such a patch, though, as it would probably be non-trivial.
Also, make sure that the patch includes documentation and unit tests.

When comparing IP addresses to be sorted, would you declare that all
IPv4 addresses sort earlier than IPv6?  Would you make the code sort
hostnames based on what IP address a DNS resolution produces for that
name, or would you stick to pure numeric formats?  Make sure the sorting
is consistent based on network ordering (the same address pairing should
sort the same way on both big and little endian machines).  Also, more
than one string can resolve to the same address (for example, ::, ::0,
and even ::0.0.0.0 are the same IPv6 address), so you'll need to
consider how to do tie-breaking sorts of strings that map to the same
address.

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

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 6 years and 243 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.