bug-coreutils
[Top][All Lists]
Advanced

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

bug#7525: bug in sort command


From: Eric Blake
Subject: bug#7525: bug in sort command
Date: Wed, 01 Dec 2010 08:14:52 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6

On 12/01/2010 06:44 AM, Kielbasiewicz, Peter wrote:
> Hello,
> there seems to be a bug in Ubuntu's 10.10  sort command.
> I suspect that it defaults to the  -f option  now which I think is wrong.

Thanks for the report.  However, this is not a bug in sort, but a
problem of your current choice of locale.  It is also a FAQ:

http://www.gnu.org/software/coreutils/faq/#Sort-does-not-sort-in-normal-order_0021

> e.g.
> {  echo a
>    echo j
>    echo A
>    echo i
>    echo AA
>    echo B
> } | sort

Running with the recently introduced 'sort --debug' option sheds some
light on your situation:

$ printf 'a\nj\nA\ni\nAA\nB\n' | src/sort --debug
src/sort: using `en_US.UTF-8' sorting rules
a
_
A
_
AA
__
B
_
i
_
j
_

address@hidden (0 0) ~/coreutils
$ printf 'a\nj\nA\ni\nAA\nB\n' | LC_ALL=C src/sort --debug
src/sort: using simple byte comparison
A
_
AA
__
B
_
a
_
i
_
j
_


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