GNU bug report logs - #18298
Sort behavior

Previous Next

Package: coreutils;

Reported by: mehdi.rakhshani <at> verizon.net

Date: Tue, 19 Aug 2014 15:49:01 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18298 in the body.
You can then email your comments to 18298 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#18298; Package coreutils. (Tue, 19 Aug 2014 15:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to mehdi.rakhshani <at> verizon.net:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 19 Aug 2014 15:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: mehdi.rakhshani <at> verizon.net
To: bug-coreutils <at> gnu.org
Subject: Sort behavior
Date: Tue, 19 Aug 2014 07:41:45 -0500 (CDT)
[Message part 1 (text/html, inline)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#18298; Package coreutils. (Tue, 19 Aug 2014 15:58:01 GMT) Full text and rfc822 format available.

Message #8 received at 18298 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: mehdi.rakhshani <at> verizon.net
Cc: 18298 <at> debbugs.gnu.org
Subject: Re: bug#18298: Sort behavior
Date: Tue, 19 Aug 2014 16:57:13 +0100
tag 18298 notabug
close 18298
stop

On 08/19/2014 01:41 PM, mehdi.rakhshani <at> verizon.net 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.





Added tag(s) notabug. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Tue, 19 Aug 2014 15:58:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 18298 <at> debbugs.gnu.org and mehdi.rakhshani <at> verizon.net Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Tue, 19 Aug 2014 15:58:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-coreutils <at> gnu.org:
bug#18298; Package coreutils. (Tue, 19 Aug 2014 16:09:01 GMT) Full text and rfc822 format available.

Message #15 received at 18298 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Pádraig Brady <P <at> draigBrady.com>,
 mehdi.rakhshani <at> verizon.net
Cc: 18298 <at> debbugs.gnu.org
Subject: Re: bug#18298: Sort behavior
Date: Tue, 19 Aug 2014 10:07:59 -0600
[Message part 1 (text/plain, inline)]
On 08/19/2014 09:57 AM, Pádraig Brady wrote:
> tag 18298 notabug
> close 18298
> stop
> 

> 
> Your locale is ignoring the punctuation chars ('-' and ' ' in your case).

To further see this in action, use 'sort --debug'.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 17 Sep 2014 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 276 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.