[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18298: Sort behavior
From: |
Pádraig Brady |
Subject: |
bug#18298: Sort behavior |
Date: |
Tue, 19 Aug 2014 16:57:13 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
tag 18298 notabug
close 18298
stop
On 08/19/2014 01:41 PM, address@hidden wrote:
> [3. text/html]
>
> Sort on LINUX is behaving in such a way that does not make common
> sense.
>
>
> Afile:
>
> 0efefi008vj00n19000088gu ATTRSTRING2------------- C
> 0efefi008vj00n19000088gu ATTRSTRING-------------0 B
> 0efefi008vj00n19000088gu ATTRSTRING-------------1 A
> 0efefi008vj00n19000088gu ATTRSTRING3------------- D
> 0efefi008vj00n19000088gu ATTRSTRING-------------- E
>
>
> Sort afile (does not work, all variations specifying aEUR"key or any
> other option does not work either)
>
> 0efefi008vj00n19000088gu ATTRSTRING-------------0 B
> 0efefi008vj00n19000088gu ATTRSTRING-------------1 A
> 0efefi008vj00n19000088gu ATTRSTRING2------------- C
> 0efefi008vj00n19000088gu ATTRSTRING3------------- D
> 0efefi008vj00n19000088gu ATTRSTRING-------------- E
Your locale is ignoring the punctuation chars ('-' and ' ' in your case).
http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Sort-does-not-sort-in-normal-order_0021
To avoid that:
LC_ALL=C sort afile
thanks,
Pádraig.