Subject: bug#20745: I would like to make a request for the sort command

From: Erik Auerswald <[email-masked]>
Date: Mon, 8 Jun 2015 11:16:37 +0200

Hi,

On Fri, Jun 05, 2015 at 01:57:33PM -0600, Eric Blake wrote:
> 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?
> 
> [...]
> justification on why people want sorted IP addresses.

FWIW I use 'sort' to sort IPv4 addresses in my ping_scan[1] script.

The info documentation for sort provides another example, log files
sorted by IP address and time stamp. That specific example even needs
two runs of sort, because sort lacks built-in support for IP addresses.

While IPv4 addresses are readily sorted by "sort -s -t '.' -k 1,1n -k
2,2n -k 3,3n -k 4,4n", this is not the case for IPv6 addresses. Having
an option for sorting IP addresses that supports both IPv4 and IPv6
seems like a useful addition to me.

Thanks,
Erik

[1] https://www.unix-ag.uni-kl.de/~auerswal/ping_scan/
-- 
Be water, my friend.
                        -- Bruce Lee