GNU bug report logs - #14318
sort: unexpected results

Previous Next

Package: coreutils;

Reported by: Kenneth Dickman <kenneth.dickman <at> citrix.com>

Date: Tue, 30 Apr 2013 01:48:02 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Pádraig Brady <P <at> draigBrady.com>
To: Kenneth Dickman <kenneth.dickman <at> citrix.com>
Cc: Vijay Patel <Vijay.Patel <at> citrix.com>, 14318 <at> debbugs.gnu.org
Subject: Re: bug#14318: sort: unexpected results
Date: Tue, 30 Apr 2013 09:40:14 +0100
tag 14318 notabug
stop

On 04/30/2013 02:37 AM, Kenneth Dickman wrote:
> Why does putting "depot" in the input file, corrupt the sort function? How can I get sort to operate properly?
> 
> $ cat good
> bin/... //b/bin/...
> logs/... //logs/...
> ... //b/...
> $ sort good
> ... //b/...
> bin/... //b/bin/...
> logs/... //logs/...
> $ cat bad
> bin/... //depot/b/bin/...
> logs/... //depot/logs/...
> ... //depot/b/...
> $ sort bad
> bin/... //depot/b/bin/...
> ... //depot/b/...
> logs/... //depot/logs/...
> $
> 
> This occurs on RedHat:

This is because in your locale, punctuation is ignored in the presence
of other sort data. I.E. '.' and ' ' are not significant to the sort.
To turn off the locale specific sorting you need to use something like:
LC_ALL=C sort ...

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

thanks,
Pádraig.




This bug report was last modified 6 years and 217 days ago.

Previous Next


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