GNU bug report logs - #6791
locale sort ordering confusion

Previous Next

Package: coreutils;

Reported by: "George Thomas Irimben (georgeti)" <georgeti <at> cisco.com>

Date: Tue, 3 Aug 2010 20:33:01 UTC

Severity: normal

Tags: moreinfo, notabug

Merged with 6790

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "George Thomas Irimben (georgeti)" <georgeti <at> cisco.com>
To: 6791 <at> debbugs.gnu.org
Subject: bug#6791: Problem(bug?) with basic sort command in Linux
Date: Wed, 4 Aug 2010 01:56:55 +0530
Hi,
Setting LC_ALL to C fixed the issue. 
But before setting this to C, with same .cshrc file, Unix didn't give me
a problem.

Does it mean my shell script which has this sort command will not work
for others unless they set their LC_ALL?
Should I set this to C in my script itself? 

Any other suggestion?

Thanks, George

-----Original Message-----
From: George Thomas Irimben (georgeti) 
Sent: Wednesday, August 04, 2010 1:33 AM
To: 'bug-coreutils <at> gnu.org'
Subject: Problem(bug?) with basic sort command in Linux

Hi,
I would like to report a problem(bug?) I am facing with sort command in
Linux.

Sorting of a simple text file using simple sort command is giving me
incorrect result.

Here is the problem:

Text file to sort has 3 lines
my-lnx7% cat y
abc/d,ABC
abc/,XYZ
abc/o,MNO

sort command from Linux is giving me below result(According to me, this
result is incorrect)

my-lnx7% sort y
abc/d,ABC
abc/o,MNO
abc/,XYZ

But, result expected is as below. Because "," is ahead of "d" in ASCII
table. 
Same found working on Unix using same input file, same command line.

abc/,XYZ
abc/d,ABC
abc/o,MNO


Pls let me know if this is a problem in Linux or I am missing something.


Thanks, George




This bug report was last modified 15 years and 8 days ago.

Previous Next


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