GNU bug report logs - #7525
bug in sort command

Previous Next

Package: coreutils;

Reported by: "Kielbasiewicz, Peter" <peter.kielbasiewicz <at> philips.com>

Date: Wed, 1 Dec 2010 13:41:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eric Blake <eblake <at> redhat.com>
To: "Kielbasiewicz, Peter" <peter.kielbasiewicz <at> philips.com>
Cc: 7525 <at> debbugs.gnu.org
Subject: bug#7525: bug in sort command
Date: Wed, 01 Dec 2010 08:14:52 -0700
[Message part 1 (text/plain, inline)]
On 12/01/2010 06:44 AM, Kielbasiewicz, Peter wrote:
> Hello,
> there seems to be a bug in Ubuntu's 10.10  sort command.
> I suspect that it defaults to the  -f option  now which I think is wrong.

Thanks for the report.  However, this is not a bug in sort, but a
problem of your current choice of locale.  It is also a FAQ:

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

> e.g.
> {  echo a
>    echo j
>    echo A
>    echo i
>    echo AA
>    echo B
> } | sort

Running with the recently introduced 'sort --debug' option sheds some
light on your situation:

$ printf 'a\nj\nA\ni\nAA\nB\n' | src/sort --debug
src/sort: using `en_US.UTF-8' sorting rules
a
_
A
_
AA
__
B
_
i
_
j
_

eblake <at> office (0 0) ~/coreutils
$ printf 'a\nj\nA\ni\nAA\nB\n' | LC_ALL=C src/sort --debug
src/sort: using simple byte comparison
A
_
AA
__
B
_
a
_
i
_
j
_


-- 
Eric Blake   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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

This bug report was last modified 14 years and 175 days ago.

Previous Next


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