coreutils
[Top][All Lists]
Advanced

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

Re: sort parameters question: -V and -f


From: Eric Blake
Subject: Re: sort parameters question: -V and -f
Date: Wed, 06 Apr 2011 16:36:30 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9

On 04/06/2011 04:04 PM, Pádraig Brady wrote:
> On 06/04/11 22:26, Assaf Gordon wrote:
>> Hello,
>>
>> I'm wondering if this is a bug (where "-f" is ignored when using version 
>> sort):
>>
>> =========
>> $ sort --debug -f -k2,2V 
>> sort: using simple byte comparison
>> sort: leading blanks are significant in key 1; consider also specifying `b'
>> sort: option `-f' is ignored
> 
> The same happens for any ordering option.
> If any is specified for the key, then all global options are ignored.
> This is specified by POSIX and here it's demonstrated on solaris:
> 
> solaris:~ > printf "a13\nA5\na1\n" | sort -f -k1r,1
> a13
> a1
> A5
> solaris:~ > printf "a13\nA5\na1\n" | sort -k1r,1
> a13
> a1
> A5

Not only that, but --debug would have told you the same:

$ printf "a13\nA5\na1\n" | LC_ALL=C sort --debug -f -k1r,1
sort: using simple byte comparison
sort: option `-f' is ignored
a13
___
___
a1
__
__
A5
__
__


[I just LOVE the --debug option - why didn't we add it sooner?]

-- 
Eric Blake   address@hidden    +1-801-349-2682
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]