coreutils
[Top][All Lists]
Advanced

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

Re: Does sort handle -t / correctly


From: Eric Blake
Subject: Re: Does sort handle -t / correctly
Date: Fri, 17 Apr 2015 11:31:45 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 04/17/2015 11:03 AM, Peng Yu wrote:
> On Fri, Apr 17, 2015 at 11:26 AM, Eric Blake <address@hidden> wrote:
>> On 04/17/2015 10:10 AM, Peng Yu wrote:
>>> Hi, I got the following results when I call sort with -t /. It seems
>>> that 'a/1.txt' should be right after 'a'. Is it the case? Or I am not
>>> using sort correctly?
>>
>> Your assumption is correct - you are using sort incorrectly, by failing
>> to take locales into account, and by failing to limit the amount of data
>> being compared to single field widths.
> 
> Thanks for the explanation.
> 
> If I don't know the number of fields, but I want to sort according to
> all fields (from 1 to whatever the max number of fields), is there a
> way to do it?

No one has really asked for that before.  Are you going to propose some
possible extension syntax to make it obvious how to generate as many key
specifications as necessary to fully cover an arbitrary number of fields
in a line?

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