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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Severity: wishlist; Reported by: "Silverman, Jeffrey X. -ND" <Jeffrey.X.Silverman.-ND@HIDDEN>; dated Fri, 5 Jun 2015 17:32:01 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.
Changed bug title to 'sort: add options to sort by IPv4/IPv6' from 'I would like to make a request for the sort command' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 20745 <at> debbugs.gnu.org:


Received: (at 20745) by debbugs.gnu.org; 8 Jun 2015 15:39:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 08 11:39:00 2015
Received: from localhost ([127.0.0.1]:45366 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1z8Z-00072e-IP
	for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 11:38:59 -0400
Received: from mail1.vodafone.ie ([213.233.128.43]:62047)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <P@HIDDEN>) id 1Z1z8U-00072K-AO
 for 20745 <at> debbugs.gnu.org; Mon, 08 Jun 2015 11:38:54 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Ag4dADO2dVVtTIHn/2dsb2JhbABcgxAfNV+CT74JhXYBAgKBKEwBAQEBAQGBC0EBAgKDXQEBBDIBVgsNCwkWDwkDAgECAUUGAQwIAQEFiCgBCK9KnV4BK4tDgj6CT4QtBaAHhm4Li1yDWSSDeD2CeAEBAQ
Received: from unknown (HELO localhost.localdomain) ([109.76.129.231])
 by mail1.vodafone.ie with ESMTP; 08 Jun 2015 16:38:42 +0100
Message-ID: <5575B702.4060603@HIDDEN>
Date: Mon, 08 Jun 2015 16:38:42 +0100
From: =?windows-1252?Q?P=E1draig_Brady?= <P@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:31.0) Gecko/20100101 Thunderbird/31.6.0
MIME-Version: 1.0
To: Stephane Chazelas <stephane.chazelas@HIDDEN>, 
 20745 <at> debbugs.gnu.org
Subject: Re: bug#20745: I would like to make a request for the sort command
References: <D19726C0.472C%jeffrey.x.silverman.-nd@HIDDEN>	<5571E34F.5000907@HIDDEN>	<D19747CF.4786%jeffrey.x.silverman.-nd@HIDDEN>	<5571FF2D.8040302@HIDDEN>	<20150608091637.GB17538@HIDDEN>
 <20150608095159.GB6261@HIDDEN>
In-Reply-To: <20150608095159.GB6261@HIDDEN>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 20745
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: 0.0 (/)

On 08/06/15 10:51, Stephane Chazelas wrote:
> 2015-06-08 11:16:37 +0200, Erik Auerswald:
> [...]
>> 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.
> [...]
> 
> In the spirit of tools doing one thing and doing it well, it
> would make more sense to have a tool that converts an IP address
> to something sortable and use that instead in combination with
> sort.
> 
> I'm not even sure having a tool just for that specific task
> would make sense though. Here, it sounds more like a job for a
> high level language like perl/python... (what if I want to sort
> on roman numerals now, week day names, astrological signs...)
> 
> for instance, here using yash syntax (you can use named pipes or
> possibly coprocs with some other shells):
> 
> ip2hex() {
>   perl -MSocket=:all -nle '
>     print unpack "(H2)*", inet_pton(/:/?AF_INET6:AF_INET, $_)'
> }
> 
> mysort() {
>   (
>     exec 3>>|4
>     tee /dev/fd/3 |
>       cut -f1 3>&- | ip2hex 3>&- |
>       paste - /dev/fd/4 3>&-
>   ) | sort | cut -f2-
> }
> 
> mysort << EOF
> 127.0.0.1       blah
> 6.6.6.6         foo
> ::1             bar
> EOF
> 
> That's still quite awkward. A shame that piping capabilities in
> shells don't extend to  more  complex scenarii where the output
> of some command can be piped to two others the output of which
> can be merged back easily.
> 
> named pipes can be used for that, but cleaning up and
> restricting access to them makes their usage quite messy.
> 
> Of course, the whole thing can be done with perl.

This is a useful example.
We're essentially talking about generalizing the
Decorate Sort Undecorate pattern here, which can be broken down to:

  Decorate
    parse
    process
    insert
  Sort
    parse
    sort
  Undecorate
    parse
    remove

Your example above, generalizes the Decorate and Undecorate
parts using shell constructs, and you had a further suggestion
for pulling those internally to sort like:

  sort '-k1,1|ip2hex' '-k2,2n|roman2int' '-k3,3|iconv -t us//TRANSLIT'

Note we have similar kind of sub processing support in split for example:

  seq 10 20 | split -nr/$(nproc) --filter='rev'

If doing within sort(1), we'd have to read as well as write to the pipe,
and also for performance these filters would be used to process the input
before passing to the standard sort consumer functions.
Now having this within sort only provides for conciseness rather
than providing a functional advantage.

Another alternative would be to generalise the Decorate portion
of the process, which would be simpler as write only, and also
inherently distributed on multicore with a separate "decorate" process.
Doing this would also be of more general use than just for sort.
So we might have:

  decorate '-k1,1|ip2hex' '-k2,2n|roman2int' '-k3,3|iconv -t us//TRANSLIT'

Generally with "decorate", you would add a column rather than replacing,
though that would be controllable with options.

You could also do this whole decorate processing with something like
http://www.pixelbeat.org/scripts/funcpy or your perl -nle method.
and that would also support correlated operations like filtering.
Though that would require users to know the python/perl or whatever,
so there is some merit I think to having something like the
above decorate command.

thanks,
Pádraig




Information forwarded to bug-coreutils@HIDDEN:
bug#20745; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Jun 2015 15:01:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 08 11:01:03 2015
Received: from localhost ([127.0.0.1]:45326 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1yXt-0006Ak-VE
	for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 11:01:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51343)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1yXr-0006AN-SV
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 11:01:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1yXi-0007m4-Cw
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 11:00:54 -0400
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,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:55926)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1yXi-0007lY-8e
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 11:00:50 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36583)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1yXc-0008Qe-9S
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 11:00:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1yXV-0007Mo-SH
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 11:00:44 -0400
Received: from plane.gmane.org ([80.91.229.3]:59459)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1yXV-0007M9-M3
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 11:00:37 -0400
Received: from list by plane.gmane.org with local (Exim 4.69)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1yXC-0005p2-Tz
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 17:00:19 +0200
Received: from 05448b1b.skybroadband.com ([5.68.139.27])
 by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
 id 1AlnuQ-0007hv-00
 for <bug-coreutils@HIDDEN>; Mon, 08 Jun 2015 17:00:18 +0200
Received: from stephane.chazelas by 05448b1b.skybroadband.com with local
 (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
 for <bug-coreutils@HIDDEN>; Mon, 08 Jun 2015 17:00:18 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-coreutils@HIDDEN
From: Stephane Chazelas <stephane.chazelas@HIDDEN>
Subject: Re: bug#20745: I would like to make a request for the sort command
Date: Mon, 8 Jun 2015 15:56:44 +0100
Lines: 32
Message-ID: <20150608145644.GD6261@HIDDEN>
References: <D19726C0.472C%jeffrey.x.silverman.-nd@HIDDEN>
 <5571E34F.5000907@HIDDEN>
 <D19747CF.4786%jeffrey.x.silverman.-nd@HIDDEN>
 <5571FF2D.8040302@HIDDEN>
 <20150608091637.GB17538@HIDDEN>
 <20150608095159.GB6261@HIDDEN>
 <20150608104332.GC17538@HIDDEN>
 <20150608111407.GA6246@HIDDEN>
 <5575A33C.2050200@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: usenet@HIDDEN
X-Gmane-NNTP-Posting-Host: 05448b1b.skybroadband.com
Content-Disposition: inline
In-Reply-To: <5575A33C.2050200@HIDDEN>
User-Agent: Mutt/1.5.21 (2010-09-15)
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: -4.1 (----)
X-Debbugs-Envelope-To: submit
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: -4.1 (----)

2015-06-08 08:14:20 -0600, Eric Blake:
> On 06/08/2015 05:14 AM, Stephane Chazelas wrote:
> 
> > Maybe there's a way to allow that without having to implement
> > the specifics in sort.
> > 
> > Like sort key flags to invoke commands:
> > 
> >    sort '-k1,1|ip2hex' '-k2,2n|roman2int' '-k3,3|iconv -t us//TRANSLIT'
> 
> That would result in a LOT of process overhead (one command spawned per
> sort key per line).  True, it would be more generic, but the performance
> would suffer compared to having a direct way to do the sorting within
> the current process.  It's going to be more efficient to do a single
> pre-process pass, then sort, then post-process, with a complicated
> script language doing the right processing per field in a single pass,
> than to do one conversion per key per row.
[...]

I'm not suggesting one process per line. Those are meant to be
filters processing the whole input, so one ip2hex process, one
roman2int... That would have to be done carefully to avoid
deadlocks, but should be efficient if done properly (with proper
buffering).

The idea being to implement the cumbersome plumbing in my
previous yash approach inside sort.

-- 
Stephane







Information forwarded to bug-coreutils@HIDDEN:
bug#20745; Package coreutils. Full text available.

Message received at 20745 <at> debbugs.gnu.org:


Received: (at 20745) by debbugs.gnu.org; 8 Jun 2015 14:14:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 08 10:14:30 2015
Received: from localhost ([127.0.0.1]:45291 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1xor-00053n-6e
	for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 10:14:29 -0400
Received: from mx1.redhat.com ([209.132.183.28]:54368)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eblake@HIDDEN>) id 1Z1xoo-00053f-Vb
 for 20745 <at> debbugs.gnu.org; Mon, 08 Jun 2015 10:14:27 -0400
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
 (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
 by mx1.redhat.com (Postfix) with ESMTPS id C2A728F033;
 Mon,  8 Jun 2015 14:14:25 +0000 (UTC)
Received: from [10.3.113.116] (ovpn-113-116.phx2.redhat.com [10.3.113.116])
 by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 t58EEPga003856; Mon, 8 Jun 2015 10:14:25 -0400
Message-ID: <5575A33C.2050200@HIDDEN>
Date: Mon, 08 Jun 2015 08:14:20 -0600
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat, Inc.
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version: 1.0
To: Stephane Chazelas <stephane.chazelas@HIDDEN>, 20745 <at> debbugs.gnu.org
Subject: Re: bug#20745: I would like to make a request for the sort command
References: <D19726C0.472C%jeffrey.x.silverman.-nd@HIDDEN>	<5571E34F.5000907@HIDDEN>	<D19747CF.4786%jeffrey.x.silverman.-nd@HIDDEN>	<5571FF2D.8040302@HIDDEN>	<20150608091637.GB17538@HIDDEN>	<20150608095159.GB6261@HIDDEN>	<20150608104332.GC17538@HIDDEN>
 <20150608111407.GA6246@HIDDEN>
In-Reply-To: <20150608111407.GA6246@HIDDEN>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="OntUTd9uhhGNL5fIVk8KC33PQ2LWU8TRA"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 20745
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 (-----)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--OntUTd9uhhGNL5fIVk8KC33PQ2LWU8TRA
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 06/08/2015 05:14 AM, Stephane Chazelas wrote:

> Maybe there's a way to allow that without having to implement
> the specifics in sort.
>=20
> Like sort key flags to invoke commands:
>=20
>    sort '-k1,1|ip2hex' '-k2,2n|roman2int' '-k3,3|iconv -t us//TRANSLIT'=


That would result in a LOT of process overhead (one command spawned per
sort key per line).  True, it would be more generic, but the performance
would suffer compared to having a direct way to do the sorting within
the current process.  It's going to be more efficient to do a single
pre-process pass, then sort, then post-process, with a complicated
script language doing the right processing per field in a single pass,
than to do one conversion per key per row.


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


--OntUTd9uhhGNL5fIVk8KC33PQ2LWU8TRA
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJVdaNAAAoJEKeha0olJ0Nq8DsIAJV40uA2lqG37KDKVuauiQF6
FdUqFpPXyRMeoKfpyr7UpGxYawsgeDzyDFxS2j0R9oT3x3/u0tQPI52dd9izL6Ey
vX2Q7uWb+lT/LQcWzPtD31Erq+fGRz7oAtHChbV5fMcKMjoPa1YMqLOB9LTFd9+p
GifCpr49Str2968lwlT1n6idmZuHoh9NWXfQtssSk8/7b+xQF+WCzGQlGcHJ1lLD
u+vUs+M4ar1ZuQh2Q+UUV7iSueut58sII7Ac685oDgg/lYJao7uSTFXy7VpygTIA
D/pID/m1qFIezjvTzhUZ91pvI5OENNMKmQ0XIhqeuVO6U3DTgcX6Y+ggTxR/xjY=
=Pj1K
-----END PGP SIGNATURE-----

--OntUTd9uhhGNL5fIVk8KC33PQ2LWU8TRA--




Information forwarded to bug-coreutils@HIDDEN:
bug#20745; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Jun 2015 12:15:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 08 08:15:39 2015
Received: from localhost ([127.0.0.1]:44810 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1vxq-0000lt-52
	for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 08:15:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46796)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1vxn-0000lg-3a
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 08:15:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1vxd-0006T9-Sf
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 08:15:30 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:46720)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1vxd-0006T5-PX
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 08:15:25 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60273)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1vxX-0002do-NQ
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 08:15:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1vxU-0006QB-H8
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 08:15:19 -0400
Received: from plane.gmane.org ([80.91.229.3]:44285)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1vxU-0006PJ-AT
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 08:15:16 -0400
Received: from list by plane.gmane.org with local (Exim 4.69)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1vxQ-0006Sg-Ss
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 14:15:13 +0200
Received: from 05448b1b.skybroadband.com ([5.68.139.27])
 by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
 id 1AlnuQ-0007hv-00
 for <bug-coreutils@HIDDEN>; Mon, 08 Jun 2015 14:15:12 +0200
Received: from stephane.chazelas by 05448b1b.skybroadband.com with local
 (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
 for <bug-coreutils@HIDDEN>; Mon, 08 Jun 2015 14:15:12 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-coreutils@HIDDEN
From: Stephane Chazelas <stephane.chazelas@HIDDEN>
Subject: Re: bug#20745: I would like to make a request for the sort command
Date: Mon, 8 Jun 2015 13:13:54 +0100
Lines: 38
Message-ID: <20150608121354.GC6261@HIDDEN>
References: <D19726C0.472C%jeffrey.x.silverman.-nd@HIDDEN>
 <5571E34F.5000907@HIDDEN>
 <D19747CF.4786%jeffrey.x.silverman.-nd@HIDDEN>
 <5571FF2D.8040302@HIDDEN>
 <20150608091637.GB17538@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: usenet@HIDDEN
X-Gmane-NNTP-Posting-Host: 05448b1b.skybroadband.com
Content-Disposition: inline
In-Reply-To: <20150608091637.GB17538@HIDDEN>
User-Agent: Mutt/1.5.21 (2010-09-15)
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: -4.1 (----)
X-Debbugs-Envelope-To: submit
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: -4.1 (----)

2015-06-08 11:16:37 +0200, Erik Auerswald:
[...]
> 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.
[...]
> [1] https://www.unix-ag.uni-kl.de/~auerswal/ping_scan/
[...]

Note that IPv4 address in quad-decimal notation can be sorted
with sort -V. Not IPv6 ones.

$ printf '%s\n' 1.2.3.4 1.12.3.4 a:2:b a:1a:b | sort -V
1.2.3.4
1.12.3.4
a:1a:b
a:2:b

IPv6 addresses sort lexically when fully expanded (as in
0000:0000:0000:0000:0000:0000:0000:0001 instead of ::1)

and IPv4 addresses sort lexically as well when in hex notation
(0x7f000001) instead of quad-decimal, or when using the
127.000.000.001 notation (though that one conflicts with the
traditional parsing (inet_addr/gethostbyname) as octal
(010.000.000.001 is traditionaly 8.0.0.1)).

So one can always pre-process the data to convert the IP
addresses in those alternative formats.


-- 
Stephane





Information forwarded to bug-coreutils@HIDDEN:
bug#20745; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Jun 2015 11:15:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 08 07:15:38 2015
Received: from localhost ([127.0.0.1]:44794 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1v1l-0006MB-CA
	for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 07:15:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58466)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1v1i-0006Lx-N9
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 07:15:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1v1c-0006F9-JQ
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 07:15:29 -0400
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,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:39831)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1v1c-0006F4-Ge
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 07:15:28 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43734)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1v1b-0002tt-6p
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 07:15:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1v1V-0006E3-7e
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 07:15:27 -0400
Received: from plane.gmane.org ([80.91.229.3]:40706)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1v1V-0006Dz-0N
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 07:15:21 -0400
Received: from list by plane.gmane.org with local (Exim 4.69)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1v1M-0001oa-6R
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 13:15:12 +0200
Received: from 05448b1b.skybroadband.com ([5.68.139.27])
 by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
 id 1AlnuQ-0007hv-00
 for <bug-coreutils@HIDDEN>; Mon, 08 Jun 2015 13:15:12 +0200
Received: from stephane.chazelas by 05448b1b.skybroadband.com with local
 (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
 for <bug-coreutils@HIDDEN>; Mon, 08 Jun 2015 13:15:12 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-coreutils@HIDDEN
From: Stephane Chazelas <stephane.chazelas@HIDDEN>
Subject: Re: bug#20745: I would like to make a request for the sort command
Date: Mon, 8 Jun 2015 12:14:07 +0100
Lines: 33
Message-ID: <20150608111407.GA6246@HIDDEN>
References: <D19726C0.472C%jeffrey.x.silverman.-nd@HIDDEN>
 <5571E34F.5000907@HIDDEN>
 <D19747CF.4786%jeffrey.x.silverman.-nd@HIDDEN>
 <5571FF2D.8040302@HIDDEN>
 <20150608091637.GB17538@HIDDEN>
 <20150608095159.GB6261@HIDDEN>
 <20150608104332.GC17538@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: usenet@HIDDEN
X-Gmane-NNTP-Posting-Host: 05448b1b.skybroadband.com
Content-Disposition: inline
In-Reply-To: <20150608104332.GC17538@HIDDEN>
User-Agent: Mutt/1.5.21 (2010-09-15)
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: -4.1 (----)
X-Debbugs-Envelope-To: submit
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: -4.1 (----)

2015-06-08 12:43:32 +0200, Erik Auerswald:
[...]
> > I'm not even sure having a tool just for that specific task
> > would make sense though. Here, it sounds more like a job for a
> > high level language like perl/python... (what if I want to sort
> > on roman numerals now, week day names, astrological signs...)
> 
> Well, IP addresses are often encountered on Internet connected computers.
> ;-)

And roman numerals are common in bibliography processing.

The "sort" command has nothing to do with "IP addresses".

OK, there's already a -M for month sorting (locale dependant)
useful in log sorting. There's already a -h and -V.

Those are still quite generic. But IPv4 and IPv6 addresses are
very specific (and the right sort order not necessarily obvious
(IPv4 vs v6, link-local addresses, different IPv4 notations...))

Maybe there's a way to allow that without having to implement
the specifics in sort.

Like sort key flags to invoke commands:

   sort '-k1,1|ip2hex' '-k2,2n|roman2int' '-k3,3|iconv -t us//TRANSLIT'

For sort to invoke those ip2hex/roman2int/iconv shell
command lines to pre-process the sort keys before sorting.

-- 
Stephane





Information forwarded to bug-coreutils@HIDDEN:
bug#20745; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Jun 2015 10:43:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 08 06:43:49 2015
Received: from localhost ([127.0.0.1]:44755 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1uWy-0005bQ-K1
	for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 06:43:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49371)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <auerswal@HIDDEN>) id 1Z1uWw-0005bD-Ez
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 06:43:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <auerswal@HIDDEN>) id 1Z1uWq-000428-3V
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 06:43:41 -0400
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]:39002)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <auerswal@HIDDEN>) id 1Z1uWq-000424-0k
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 06:43:40 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34586)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <auerswal@HIDDEN>) id 1Z1uWo-00051D-TJ
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 06:43:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <auerswal@HIDDEN>) id 1Z1uWl-0003yP-PI
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 06:43:38 -0400
Received: from mailgw1.uni-kl.de ([2001:638:208:120::220]:59920)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <auerswal@HIDDEN>) id 1Z1uWl-0003xG-EK
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 06:43:35 -0400
Received: from sushi.unix-ag.uni-kl.de (sushi.unix-ag.uni-kl.de
 [IPv6:2001:638:208:ef34:0:ff:fe00:65])
 by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-7) with ESMTP id t58AhWki021610
 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT)
 for <bug-coreutils@HIDDEN>; Mon, 8 Jun 2015 12:43:32 +0200
Received: from sushi.unix-ag.uni-kl.de (ip6-localhost [IPv6:::1])
 by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Debian-4) with ESMTP id
 t58AhWH9028537
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)
 for <bug-coreutils@HIDDEN>; Mon, 8 Jun 2015 12:43:32 +0200
Received: (from auerswal@localhost)
 by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Submit) id t58AhWoN028536
 for bug-coreutils@HIDDEN; Mon, 8 Jun 2015 12:43:32 +0200
Date: Mon, 8 Jun 2015 12:43:32 +0200
From: Erik Auerswald <auerswal@HIDDEN>
To: bug-coreutils@HIDDEN
Subject: Re: bug#20745: I would like to make a request for the sort command
Message-ID: <20150608104332.GC17538@HIDDEN>
Mail-Followup-To: Erik Auerswald <auerswal@HIDDEN>,
 bug-coreutils@HIDDEN
References: <D19726C0.472C%jeffrey.x.silverman.-nd@HIDDEN>
 <5571E34F.5000907@HIDDEN>
 <D19747CF.4786%jeffrey.x.silverman.-nd@HIDDEN>
 <5571FF2D.8040302@HIDDEN>
 <20150608091637.GB17538@HIDDEN>
 <20150608095159.GB6261@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20150608095159.GB6261@HIDDEN>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
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
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 (-----)

Hi,

On Mon, Jun 08, 2015 at 10:51:59AM +0100, Stephane Chazelas wrote:
> 2015-06-08 11:16:37 +0200, Erik Auerswald:
> [...]
> > 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.
> [...]
> 
> I'm not even sure having a tool just for that specific task
> would make sense though. Here, it sounds more like a job for a
> high level language like perl/python... (what if I want to sort
> on roman numerals now, week day names, astrological signs...)

Well, IP addresses are often encountered on Internet connected computers.
;-)

> for instance, here using yash syntax (you can use named pipes or
> possibly coprocs with some other shells):
> 
> ip2hex() {
>   perl -MSocket=:all -nle '
>     print unpack "(H2)*", inet_pton(/:/?AF_INET6:AF_INET, $_)'
> }
> 
> mysort() {
>   (
>     exec 3>>|4
>     tee /dev/fd/3 |
>       cut -f1 3>&- | ip2hex 3>&- |
>       paste - /dev/fd/4 3>&-
>   ) | sort | cut -f2-
> }
> 
> mysort << EOF
> 127.0.0.1       blah
> 6.6.6.6         foo
> ::1             bar
> EOF
> 
> That's still quite awkward. A shame that piping capabilities in
> shells don't extend to  more  complex scenarii where the output
> of some command can be piped to two others the output of which
> can be merged back easily.
> 
> named pipes can be used for that, but cleaning up and
> restricting access to them makes their usage quite messy.
> 
> Of course, the whole thing can be done with perl.

I'd say the above is a very good reason for implementing the asked for
feature in sort.

Thanks,
Erik
-- 
Design your product to please the users.
                        -- Paul Graham




Information forwarded to bug-coreutils@HIDDEN:
bug#20745; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Jun 2015 09:55:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 08 05:55:38 2015
Received: from localhost ([127.0.0.1]:44705 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1tmL-0004RL-A6
	for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 05:55:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33930)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1tmI-0004R7-A7
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 05:55:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1tmC-0004qf-Ba
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 05:55:29 -0400
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,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:52514)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1tmC-0004qU-8a
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 05:55:28 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:47428)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1tmB-00074w-7o
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 05:55:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1tm7-0004mK-Ur
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 05:55:27 -0400
Received: from plane.gmane.org ([80.91.229.3]:36243)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1tm7-0004ky-Oi
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 05:55:23 -0400
Received: from list by plane.gmane.org with local (Exim 4.69)
 (envelope-from <gcgcb-bug-coreutils-616@HIDDEN>)
 id 1Z1tm5-0002pL-Qm
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 11:55:21 +0200
Received: from 05448b1b.skybroadband.com ([5.68.139.27])
 by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
 id 1AlnuQ-0007hv-00
 for <bug-coreutils@HIDDEN>; Mon, 08 Jun 2015 11:55:21 +0200
Received: from stephane.chazelas by 05448b1b.skybroadband.com with local
 (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
 for <bug-coreutils@HIDDEN>; Mon, 08 Jun 2015 11:55:21 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-coreutils@HIDDEN
From: Stephane Chazelas <stephane.chazelas@HIDDEN>
Subject: Re: bug#20745: I would like to make a request for the sort command
Date: Mon, 8 Jun 2015 10:51:59 +0100
Lines: 59
Message-ID: <20150608095159.GB6261@HIDDEN>
References: <D19726C0.472C%jeffrey.x.silverman.-nd@HIDDEN>
 <5571E34F.5000907@HIDDEN>
 <D19747CF.4786%jeffrey.x.silverman.-nd@HIDDEN>
 <5571FF2D.8040302@HIDDEN>
 <20150608091637.GB17538@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: usenet@HIDDEN
X-Gmane-NNTP-Posting-Host: 05448b1b.skybroadband.com
Content-Disposition: inline
In-Reply-To: <20150608091637.GB17538@HIDDEN>
User-Agent: Mutt/1.5.21 (2010-09-15)
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: -4.1 (----)
X-Debbugs-Envelope-To: submit
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: -4.1 (----)

2015-06-08 11:16:37 +0200, Erik Auerswald:
[...]
> 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.
[...]

In the spirit of tools doing one thing and doing it well, it
would make more sense to have a tool that converts an IP address
to something sortable and use that instead in combination with
sort.

I'm not even sure having a tool just for that specific task
would make sense though. Here, it sounds more like a job for a
high level language like perl/python... (what if I want to sort
on roman numerals now, week day names, astrological signs...)

for instance, here using yash syntax (you can use named pipes or
possibly coprocs with some other shells):

ip2hex() {
  perl -MSocket=:all -nle '
    print unpack "(H2)*", inet_pton(/:/?AF_INET6:AF_INET, $_)'
}

mysort() {
  (
    exec 3>>|4
    tee /dev/fd/3 |
      cut -f1 3>&- | ip2hex 3>&- |
      paste - /dev/fd/4 3>&-
  ) | sort | cut -f2-
}

mysort << EOF
127.0.0.1       blah
6.6.6.6         foo
::1             bar
EOF

That's still quite awkward. A shame that piping capabilities in
shells don't extend to  more  complex scenarii where the output
of some command can be piped to two others the output of which
can be merged back easily.

named pipes can be used for that, but cleaning up and
restricting access to them makes their usage quite messy.

Of course, the whole thing can be done with perl.

-- 
Stephane





Information forwarded to bug-coreutils@HIDDEN:
bug#20745; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Jun 2015 09:17:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 08 05:17:21 2015
Received: from localhost ([127.0.0.1]:44660 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1tBI-0003Ub-7z
	for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 05:17:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47268)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <auerswal@HIDDEN>) id 1Z1tBF-0003UH-Lo
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 05:17:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <auerswal@HIDDEN>) id 1Z1tB4-0003IB-5m
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 05:17:12 -0400
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]:47795)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <auerswal@HIDDEN>) id 1Z1tB4-0003I6-32
 for submit <at> debbugs.gnu.org; Mon, 08 Jun 2015 05:17:06 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60718)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <auerswal@HIDDEN>) id 1Z1tAz-0003Ww-VN
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 05:17:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <auerswal@HIDDEN>) id 1Z1tAy-0003Ak-R4
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 05:17:01 -0400
Received: from mailgw1.uni-kl.de ([2001:638:208:120::220]:49337)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <auerswal@HIDDEN>) id 1Z1tAy-0002xi-H3
 for bug-coreutils@HIDDEN; Mon, 08 Jun 2015 05:17:00 -0400
Received: from sushi.unix-ag.uni-kl.de (sushi.unix-ag.uni-kl.de
 [IPv6:2001:638:208:ef34:0:ff:fe00:65])
 by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-7) with ESMTP id t589GbP5005901
 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT)
 for <bug-coreutils@HIDDEN>; Mon, 8 Jun 2015 11:16:37 +0200
Received: from sushi.unix-ag.uni-kl.de (ip6-localhost [IPv6:::1])
 by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Debian-4) with ESMTP id
 t589GbCe025838
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)
 for <bug-coreutils@HIDDEN>; Mon, 8 Jun 2015 11:16:37 +0200
Received: (from auerswal@localhost)
 by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Submit) id t589Gb3k025837
 for bug-coreutils@HIDDEN; Mon, 8 Jun 2015 11:16:37 +0200
Date: Mon, 8 Jun 2015 11:16:37 +0200
From: Erik Auerswald <auerswal@HIDDEN>
To: bug-coreutils@HIDDEN
Subject: Re: bug#20745: I would like to make a request for the sort command
Message-ID: <20150608091637.GB17538@HIDDEN>
Mail-Followup-To: Erik Auerswald <auerswal@HIDDEN>,
 bug-coreutils@HIDDEN
References: <D19726C0.472C%jeffrey.x.silverman.-nd@HIDDEN>
 <5571E34F.5000907@HIDDEN>
 <D19747CF.4786%jeffrey.x.silverman.-nd@HIDDEN>
 <5571FF2D.8040302@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5571FF2D.8040302@HIDDEN>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
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
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 (-----)

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




Information forwarded to bug-coreutils@HIDDEN:
bug#20745; Package coreutils. Full text available.

Message received at 20745 <at> debbugs.gnu.org:


Received: (at 20745) by debbugs.gnu.org; 5 Jun 2015 19:57:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 05 15:57:43 2015
Received: from localhost ([127.0.0.1]:42170 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z0xkM-0005eo-KP
	for submit <at> debbugs.gnu.org; Fri, 05 Jun 2015 15:57:43 -0400
Received: from mx1.redhat.com ([209.132.183.28]:41160)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eblake@HIDDEN>) id 1Z0xkJ-0005ef-Rw
 for 20745 <at> debbugs.gnu.org; Fri, 05 Jun 2015 15:57:40 -0400
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
 (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
 by mx1.redhat.com (Postfix) with ESMTPS id 05E96385D42;
 Fri,  5 Jun 2015 19:57:38 +0000 (UTC)
Received: from [10.3.113.183] (ovpn-113-183.phx2.redhat.com [10.3.113.183])
 by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 t55JvcvC015224; Fri, 5 Jun 2015 15:57:38 -0400
Message-ID: <5571FF2D.8040302@HIDDEN>
Date: Fri, 05 Jun 2015 13:57:33 -0600
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat, Inc.
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version: 1.0
To: "Silverman, Jeffrey X. -ND" <Jeffrey.X.Silverman.-ND@HIDDEN>,
 =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@HIDDEN>,
 "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
References: <D19726C0.472C%jeffrey.x.silverman.-nd@HIDDEN>	<5571E34F.5000907@HIDDEN>
 <D19747CF.4786%jeffrey.x.silverman.-nd@HIDDEN>
In-Reply-To: <D19747CF.4786%jeffrey.x.silverman.-nd@HIDDEN>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="J5hWrSUjkt8DhxplWFwJhrHFH3r9pt7Fv"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 20745
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 (-----)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--J5hWrSUjkt8DhxplWFwJhrHFH3r9pt7Fv
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

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
>>

>=20
> I would like to join the debate.  Would you entertain that, or is the
> issue settled.
>=20
> 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.

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


--J5hWrSUjkt8DhxplWFwJhrHFH3r9pt7Fv
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJVcf8tAAoJEKeha0olJ0NqR1kH/A6iE0y3ffEGaTeYesPTsEuS
uAhYGyWEn/xkth3f0mXQBJU+xWiI2O7SSRNjfT1CnkYGvRGXPYk4qyO6jcEJ/8gG
PYJJVGsopp4Te616roieWOFBBMGZZ/iIKdFEmijBMFoiyfmhFqJa3EV8ZtP4wPu5
MOo1WscCwh6Pxd9uyoLI+9bx0Y6H/Kio1dPCuSF6wixP5hUqLmlJdOaNyF7FQ9u6
u0f0pZz2TOYIUSj/2EUD4towULXrDy430UhPHPvoKzCSqo32U8siMQ781i2ETv/B
JXgksjJchAfY6tHXCBk9/O9Hf9ZPW9U8aFwiEMuh0g79wXHLQWHIhoezqxOZCPA=
=GgbQ
-----END PGP SIGNATURE-----

--J5hWrSUjkt8DhxplWFwJhrHFH3r9pt7Fv--




Information forwarded to bug-coreutils@HIDDEN:
bug#20745; Package coreutils. Full text available.

Message received at 20745 <at> debbugs.gnu.org:


Received: (at 20745) by debbugs.gnu.org; 5 Jun 2015 19:36:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 05 15:36:58 2015
Received: from localhost ([127.0.0.1]:42106 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z0xQH-00058p-UN
	for submit <at> debbugs.gnu.org; Fri, 05 Jun 2015 15:36:58 -0400
Received: from msg1.disney.com ([204.128.192.17]:50216)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <Jeffrey.X.Silverman.-ND@HIDDEN>)
 id 1Z0xQF-00058d-79
 for 20745 <at> debbugs.gnu.org; Fri, 05 Jun 2015 15:36:56 -0400
Received: from int2.disney.pvt (int2.disney.pvt [153.7.110.7])
 by msg1.disney.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id
 t55Jar3T030884
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
 Fri, 5 Jun 2015 19:36:54 GMT
Received: from sm-cala-xht02.swna.wdpr.disney.com
 (SM-CALA-XHT02.swna.wdpr.disney.com [153.7.248.17])
 by int2.disney.pvt (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id
 t55JahqA005581
 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL);
 Fri, 5 Jun 2015 19:36:52 GMT
Received: from CMNVLEX0001.swna.wdpr.disney.com (10.40.120.11) by
 sm-cala-xht02.swna.wdpr.disney.com (153.7.248.17) with Microsoft SMTP Server
 (TLS) id 8.3.389.2; Fri, 5 Jun 2015 12:35:32 -0700
Received: from CMNVLEXV0002.swna.wdpr.disney.com (10.40.120.32) by
 CMNVLEX0001.swna.wdpr.disney.com (10.40.120.11) with Microsoft SMTP Server
 (TLS) id 15.0.913.22; Fri, 5 Jun 2015 12:35:31 -0700
Received: from cmnvlapv0003.idmzswna.idmz.disney.com (10.41.32.13) by
 CMNVLEXV0002.swna.wdpr.disney.com (10.40.120.32) with Microsoft SMTP Server
 (TLS) id 15.0.913.22 via Frontend Transport; Fri, 5 Jun 2015 12:35:32 -0700
Received: from na01-bn1-obe.outbound.protection.outlook.com (10.41.224.12) by
 outlooksmtp.disney.com (10.41.32.13) with Microsoft SMTP Server
 (TLS) id 15.0.913.22; Fri, 5 Jun 2015 12:35:32 -0700
Received: from BN1PR0301MB0721.namprd03.prod.outlook.com (10.160.78.140) by
 BN1PR0301MB0721.namprd03.prod.outlook.com (10.160.78.140) with Microsoft SMTP
 Server (TLS) id 15.1.184.17; Fri, 5 Jun 2015 19:35:30 +0000
Received: from BN1PR0301MB0721.namprd03.prod.outlook.com ([10.160.78.140]) by
 BN1PR0301MB0721.namprd03.prod.outlook.com ([10.160.78.140]) with
 mapi id 15.01.0184.014; Fri, 5 Jun 2015 19:35:30 +0000
From: "Silverman, Jeffrey X. -ND" <Jeffrey.X.Silverman.-ND@HIDDEN>
To: =?iso-8859-1?Q?P=E1draig_Brady?= <P@HIDDEN>,
 "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
Thread-Topic: bug#20745: I would like to make a request for the sort command
Thread-Index: AQHQn7Lst8CNe0lxkUmbBaaRd/EHZp2eMxqA//+ltoA=
Date: Fri, 5 Jun 2015 19:35:30 +0000
Message-ID: <D19747CF.4786%jeffrey.x.silverman.-nd@HIDDEN>
References: <D19726C0.472C%jeffrey.x.silverman.-nd@HIDDEN>
 <5571E34F.5000907@HIDDEN>
In-Reply-To: <5571E34F.5000907@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
user-agent: Microsoft-MacOutlook/14.4.5.141003
authentication-results: draigBrady.com; dkim=none (message not signed)
 header.d=none;
x-ms-exchange-messagesentrepresentingtype: 1
x-originating-ip: [204.128.192.31]
x-microsoft-exchange-diagnostics: 1; BN1PR0301MB0721;
 3:U6fITrXP4uNvkXsIQJqrdBvgyXjfXEODbpawUuPCEtVpNMBRglWmed/tmu9DO6swpqnQcALpXi/e8VmG0x/+xX7+WSvTkO1eLLQgvOl4p8gUXIkrOWVP/buZUjPauPtU0vKy55aPl4uKaEtOy5VDbA==;
 10:Vz1YFqZfFtkxmVKLmhYa6ZWtd3fb9/J2QHonBJxu3MFB7+Lmc5JCssdMMylNTVRB/iXJ15x6M1ndXOV0bhU/MAtcHrj6lTTeUvPvvn9KZyo=;
 6:v94JTGavgRT0XMxYvHax1RN9JJwHELpq1gpkiseJc+j+SXhgHgsReFt1sXtO4Q1N
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0721;
x-microsoft-antispam-prvs: <BN1PR0301MB0721BF7DF75EB37A72C5EB70DCB20@HIDDEN>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
 RULEID:(601004)(520003)(5005006)(3002001); SRVR:BN1PR0301MB0721; BCL:0; PCL:0;
 RULEID:; SRVR:BN1PR0301MB0721; 
x-forefront-prvs: 05986C03E0
x-forefront-antispam-report: SFV:NSPM;
 SFS:(10019020)(6009001)(24454002)(479174004)(51704005)(377454003)(40100003)(122556002)(83506001)(2501003)(5002640100001)(2950100001)(66066001)(92566002)(86362001)(15975445007)(102836002)(46102003)(50986999)(36756003)(77096005)(54356999)(189998001)(77156002)(76176999)(62966003)(107886002)(87936001)(2656002)(19580405001)(19580395003)(5001960100002)(106116001)(99286002)(5001770100001)(4001350100001)(781001);
 DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR0301MB0721;
 H:BN1PR0301MB0721.namprd03.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en;
Content-Type: text/plain; charset="iso-8859-1"
Content-ID: <DB6525450FF1294EA4EBF03102F79084@HIDDEN>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jun 2015 19:35:30.7936 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 56b731a8-a2ac-4c32-bf6b-616810e913c6
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0721
X-OriginatorOrg: disney.com
X-Flow-Control: Sendmail Flow Controller v2.2.5 int2.disney.pvt t55JahqA005581
X-Flow-Control-Info: class=Exchange rcpts=2 size=1245
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 20745
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 6/5/15, 10:58 AM, "P=E1draig Brady" <P@HIDDEN> wrote:

>On 05/06/15 18:13, Silverman, Jeffrey X. -ND wrote:
>> People,
>>=20
>> I realize that the sort command must be on the order of 40 years old
>>and is =B3mature=B2 software, but I would like to make a request for
>>enhancement anyway.  I would like the capability of adding 2 data types
>>that can be sorted: IPv4 addresses and IPv6 addresses.  To do that, the
>>addresses should be converted to integers of length 32 bits and 128 bits
>>and then sorted. I=B9m not sure that 128 bit integers is portable, but
>>converting to a 32 bit string with no missing zeros would suffice.
>>=20
>>=20
>> If this is something that interests you, then I think I could write a
>>preprocessor in python as a proof of concept.
>
>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
>
>thanks,
>P=E1draig.

P=E1draig,


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?


Jeff

>





Information forwarded to bug-coreutils@HIDDEN:
bug#20745; Package coreutils. Full text available.

Message received at 20745 <at> debbugs.gnu.org:


Received: (at 20745) by debbugs.gnu.org; 5 Jun 2015 17:58:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 05 13:58:45 2015
Received: from localhost ([127.0.0.1]:42058 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z0vtE-0001Ii-EC
	for submit <at> debbugs.gnu.org; Fri, 05 Jun 2015 13:58:44 -0400
Received: from mx1.redhat.com ([209.132.183.28]:50991)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <P@HIDDEN>) id 1Z0vtC-0001Ia-NR
 for 20745 <at> debbugs.gnu.org; Fri, 05 Jun 2015 13:58:43 -0400
Received: from int-mx13.intmail.prod.int.phx2.redhat.com
 (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26])
 by mx1.redhat.com (Postfix) with ESMTPS id F303F2F02B7;
 Fri,  5 Jun 2015 17:58:41 +0000 (UTC)
Received: from localhost.localdomain (ovpn-116-111.ams2.redhat.com
 [10.36.116.111])
 by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 t55Hwdm3027903
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Fri, 5 Jun 2015 13:58:41 -0400
Message-ID: <5571E34F.5000907@HIDDEN>
Date: Fri, 05 Jun 2015 18:58:39 +0100
From: =?windows-1252?Q?P=E1draig_Brady?= <P@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:31.0) Gecko/20100101 Thunderbird/31.6.0
MIME-Version: 1.0
To: "Silverman, Jeffrey X. -ND" <Jeffrey.X.Silverman.-ND@HIDDEN>,
 20745 <at> debbugs.gnu.org
Subject: Re: bug#20745: I would like to make a request for the sort command
References: <D19726C0.472C%jeffrey.x.silverman.-nd@HIDDEN>
In-Reply-To: <D19726C0.472C%jeffrey.x.silverman.-nd@HIDDEN>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 20745
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 05/06/15 18:13, Silverman, Jeffrey X. -ND wrote:
> People,
> 
> I realize that the sort command must be on the order of 40 years old and is “mature” software, but I would like to make a request for enhancement anyway.  I would like the capability of adding 2 data types that can be sorted: IPv4 addresses and IPv6 addresses.  To do that, the addresses should be converted to integers of length 32 bits and 128 bits and then sorted. I’m not sure that 128 bit integers is portable, but converting to a 32 bit string with no missing zeros would suffice.
> 
> 
> If this is something that interests you, then I think I could write a preprocessor in python as a proof of concept.

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

thanks,
Pádraig.




Information forwarded to bug-coreutils@HIDDEN:
bug#20745; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Jun 2015 17:31:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 05 13:31:12 2015
Received: from localhost ([127.0.0.1]:42031 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z0vSY-0000eW-Ji
	for submit <at> debbugs.gnu.org; Fri, 05 Jun 2015 13:31:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48921)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <Jeffrey.X.Silverman.-ND@HIDDEN>)
 id 1Z0vBr-0000Ed-EZ
 for submit <at> debbugs.gnu.org; Fri, 05 Jun 2015 13:13:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <Jeffrey.X.Silverman.-ND@HIDDEN>)
 id 1Z0vBk-0001gm-GN
 for submit <at> debbugs.gnu.org; Fri, 05 Jun 2015 13:13:50 -0400
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,HTML_MESSAGE
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:52950)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <Jeffrey.X.Silverman.-ND@HIDDEN>)
 id 1Z0vBk-0001gi-E2
 for submit <at> debbugs.gnu.org; Fri, 05 Jun 2015 13:13:48 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34185)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <Jeffrey.X.Silverman.-ND@HIDDEN>)
 id 1Z0vBi-0000vx-P5
 for bug-coreutils@HIDDEN; Fri, 05 Jun 2015 13:13:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <Jeffrey.X.Silverman.-ND@HIDDEN>)
 id 1Z0vBf-0001gE-H7
 for bug-coreutils@HIDDEN; Fri, 05 Jun 2015 13:13:46 -0400
Received: from msg12.disney.com ([192.195.66.28]:44986)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <Jeffrey.X.Silverman.-ND@HIDDEN>)
 id 1Z0vBf-0001g5-BP
 for bug-coreutils@HIDDEN; Fri, 05 Jun 2015 13:13:43 -0400
Received: from int11.disney.pvt (int11.disney.pvt [153.6.62.222])
 by msg12.disney.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id
 t55HDfKc018147
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL)
 for <bug-coreutils@HIDDEN>; Fri, 5 Jun 2015 17:13:42 GMT
Received: from sm-flor-xht02.wdw.disney.com (sm-flor-xht02.wdw.disney.com
 [153.6.66.106])
 by int11.disney.pvt (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id
 t55HDLrY014934
 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL)
 for <bug-coreutils@HIDDEN>; Fri, 5 Jun 2015 17:13:41 GMT
Received: from CMNCKEX0002.swna.wdpr.disney.com (10.203.192.32) by
 sm-flor-xht02.wdw.disney.com (153.6.66.106) with Microsoft SMTP Server (TLS)
 id 8.3.389.2; Fri, 5 Jun 2015 13:13:37 -0400
Received: from CMNCKEX0003.swna.wdpr.disney.com (10.203.192.33) by
 CMNCKEX0002.swna.wdpr.disney.com (10.203.192.32) with Microsoft SMTP Server
 (TLS) id 15.0.913.22; Fri, 5 Jun 2015 13:11:12 -0400
Received: from cmnckapv0006.idmzswna.idmz.disney.com (10.201.128.56) by
 CMNCKEX0003.swna.wdpr.disney.com (10.203.192.33) with Microsoft SMTP Server
 (TLS) id 15.0.913.22 via Frontend Transport; Fri, 5 Jun 2015 13:13:37 -0400
Received: from na01-by2-obe.outbound.protection.outlook.com (10.215.208.236)
 by outlooksmtp.disney.com (10.201.128.56) with Microsoft SMTP Server (TLS) id
 15.0.913.22; Fri, 5 Jun 2015 13:13:32 -0400
Received: from BN1PR0301MB0721.namprd03.prod.outlook.com (10.160.78.140) by
 BN1PR0301MB0722.namprd03.prod.outlook.com (10.160.78.141) with Microsoft SMTP
 Server (TLS) id 15.1.184.17; Fri, 5 Jun 2015 17:13:31 +0000
Received: from BN1PR0301MB0721.namprd03.prod.outlook.com ([10.160.78.140]) by
 BN1PR0301MB0721.namprd03.prod.outlook.com ([10.160.78.140]) with
 mapi id 15.01.0184.014; Fri, 5 Jun 2015 17:13:22 +0000
From: "Silverman, Jeffrey X. -ND" <Jeffrey.X.Silverman.-ND@HIDDEN>
To: "bug-coreutils@HIDDEN" <bug-coreutils@HIDDEN>
Subject: I would like to make a request for the sort command
Thread-Topic: I would like to make a request for the sort command
Thread-Index: AQHQn7Lst8CNe0lxkUmbBaaRd/EHZg==
Date: Fri, 5 Jun 2015 17:13:21 +0000
Message-ID: <D19726C0.472C%jeffrey.x.silverman.-nd@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
user-agent: Microsoft-MacOutlook/14.4.5.141003
authentication-results: gnu.org; dkim=none (message not signed) header.d=none; 
x-ms-exchange-messagesentrepresentingtype: 1
x-originating-ip: [68.71.223.4]
x-microsoft-exchange-diagnostics: 1; BN1PR0301MB0722;
 3:1ta7gvG5/ePKCnzXYzSKDsFWpBwIcw9nIyGC0ThRqNk1e+3RN8uIlDPX1m8iosTHLvwagui8uSxau7vJp+VSZsOIjA9JBnN9WsWmG7LPQ4iODlCBmCb4g7KxEVL72qB0+CNsE2yC4nZ9YpoILuBYlQ==;
 10:cTOcbeaaEoZHAqjESgv+iR0qGUlrHugfUR3GZzWehdrURIhmtr9bal97JJHGOoMX7vMffeX+e0+zeRCqNyt6hTrwU+jczlvmVNj0R2T0Yw0=;
 6:QEbxYSAV1A+OLSrebUUavzlyzdU82PVqT6/yhsiFHnQKl8EnNGRH/YqSFsr481He
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0722;
x-microsoft-antispam-prvs: <BN1PR0301MB072238CB016A717C52F360CADCB20@HIDDEN>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
 RULEID:(601004)(520003)(5005006)(3002001); SRVR:BN1PR0301MB0722; BCL:0; PCL:0;
 RULEID:; SRVR:BN1PR0301MB0722; 
x-forefront-prvs: 05986C03E0
x-forefront-antispam-report: SFV:NSPM;
 SFS:(10019020)(6009001)(36756003)(2501003)(5002640100001)(19580395003)(83506001)(99286002)(50986999)(19580405001)(106116001)(4001350100001)(87936001)(2656002)(107886002)(16236675004)(5001960100002)(54356999)(110136002)(189998001)(66066001)(86362001)(40100003)(2351001)(229853001)(450100001)(46102003)(62966003)(122556002)(77156002)(77096005)(102836002)(92566002);
 DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR0301MB0722;
 H:BN1PR0301MB0721.namprd03.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en;
Content-Type: multipart/alternative;
 boundary="_000_D19726C0472Cjeffreyxsilvermannddisneycom_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jun 2015 17:13:21.8693 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 56b731a8-a2ac-4c32-bf6b-616810e913c6
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0722
X-OriginatorOrg: disney.com
X-Flow-Control: Sendmail Flow Controller v2.2.5 int11.disney.pvt t55HDLrY014934
X-Flow-Control-Info: class=Exchange rcpts=1 size=2427
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
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: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 05 Jun 2015 13:31:08 -0400
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: -4.1 (----)

--_000_D19726C0472Cjeffreyxsilvermannddisneycom_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

People,

I realize that the sort command must be on the order of 40 years old and is=
 "mature" software, but I would like to make a request for enhancement anyw=
ay.  I would like the capability of adding 2 data types that can be sorted:=
 IPv4 addresses and IPv6 addresses.  To do that, the addresses should be co=
nverted to integers of length 32 bits and 128 bits and then sorted. I'm not=
 sure that 128 bit integers is portable, but converting to a 32 bit string =
with no missing zeros would suffice.


If this is something that interests you, then I think I could write a prepr=
ocessor in python as a proof of concept.


Sincerely yours,


Jeff Silverman
You may also reach me at jeffsilverm@HIDDEN


--_000_D19726C0472Cjeffreyxsilvermannddisneycom_
Content-Type: text/html; charset="iso-8859-1"
Content-ID: <AE18DB2B97BAFB40808784094380680B@HIDDEN>
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
</head>
<body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-lin=
e-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-fami=
ly: Calibri, sans-serif;">
<div>People,</div>
<div><br>
</div>
<div>I realize that the sort command must be on the order of 40 years old a=
nd is &#8220;mature&#8221; software, but I would like to make a request for=
 enhancement anyway. &nbsp;I would like the capability of adding 2 data typ=
es that can be sorted: IPv4 addresses and IPv6 addresses.
 &nbsp;To do that, the addresses should be converted to integers of length =
32 bits and 128 bits and then sorted. I&#8217;m not sure that 128 bit integ=
ers is portable, but converting to a 32 bit string with no missing zeros wo=
uld suffice.</div>
<div><br>
</div>
<div><br>
</div>
<div>If this is something that interests you, then I think I could write a =
preprocessor in python as a proof of concept.</div>
<div><br>
</div>
<div><br>
</div>
<div>Sincerely yours,</div>
<div><br>
</div>
<div><br>
</div>
<div>Jeff Silverman</div>
<div>You may also reach me at jeffsilverm@HIDDEN</div>
<div><br>
</div>
</body>
</html>

--_000_D19726C0472Cjeffreyxsilvermannddisneycom_--




Acknowledgement sent to "Silverman, Jeffrey X. -ND" <Jeffrey.X.Silverman.-ND@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#20745; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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