bug-coreutils
[Top][All Lists]
Advanced

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

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


From: Eric Blake
Subject: bug#20745: I would like to make a request for the sort command
Date: Mon, 08 Jun 2015 08:14:20 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

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.


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