[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6007: sort command in Fedora10
From: |
Eric Blake |
Subject: |
bug#6007: sort command in Fedora10 |
Date: |
Thu, 22 Apr 2010 16:28:08 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 |
On 04/22/2010 03:34 PM, Vito Di Blas wrote:
> and I obtain the file bbb.txt
>
> Cari figli, domani
> Cari figli, ieri
> Cari figli, oggi
> Cari figlioli
> Cari figliozzi
> Cari figli, pregate
> Cari figlipucci
>
>
> which doesn't look sorted according to my expectation.
Not a bug, if you are in a locale where the collating order discards
punctuation and whitespace as insignificant.
> Then, in WindowsXP, I sort again the file aaa.txt with the command:
>
> <...> sort aaa.txt > ccc.txt
>
> and I get the file ccc.txt :
>
> Cari figli, domani
> Cari figli, ieri
> Cari figli, oggi
> Cari figli, pregate
> Cari figlioli
> Cari figliozzi
> Cari figlipucci
This is due to a difference in the default locales of your two systems.
http://www.gnu.org/software/coreutils/faq/#Sort-does-not-sort-in-normal-order_0021
Try again with 'LC_ALL=C sort aaa.txt' to see the difference.
Personally, I have 'export LC_COLLATE=C' in my ~/.bashrc in order to
guarantee traditional sorting, while everything else continues to follow
my default locale.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature