GNU bug report logs - #7323
sort bug

Previous Next

Package: coreutils;

Reported by: Thomas A Schweiger <tom.schweiger <at> acxiom.com>

Date: Wed, 3 Nov 2010 14:53:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


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

From: Thomas A Schweiger <tom.schweiger <at> acxiom.com>
To: bug-coreutils <at> gnu.org
Subject: sort bug
Date: Wed, 03 Nov 2010 09:52:25 -0500
[Message part 1 (text/plain, inline)]
I have found an anomaly in the sort utility.

Given the input:

1|1|1||Terry|a|Willis|||19610203|||||| 315 | E | Sutton | Street | || |Fayetteville|AR| 72701 | ||| |||||TEST||
2|1|1||Terry| |Willis|||19610204|||||| 315 | E | Sutton | Street | || |Fayetteville|AR|72701 | ||| |||||TEST|| 
3|1|1||Andy||smith   |||19610203|||||| 315 | | Willow | Street | || |Fayetteville|AR| 72701| ||| |||||TEST||
4|1|1||Andy||smith   |||19610302|||||| 315 | | Willow | Street | || |Fayetteville|AR| 72701 | ||| |||||TEST||
5|1|1||MARY||JONES   |||19610203|||||| 1400 |N | eastwood | drive | || |Fayetteville|AR| 72701 | ||| |||||TEST||
6|1|1||MARY||JONES   |||19660203|||||| 1400 |N | eastwood | drive | || |Fayetteville|AR| 72701 | ||| |||||TEST||
7|1|1||MARY||JONES   |||19610202|||||| 1400 |N | eastwood | drive | || |Fayetteville|AR| 72701 | ||| |||||TEST||
8|1|1||MARY||JONES   |||19615292|||||| 1400 |N | eastwood | drive | || |Fayetteville|AR| 72701 | ||| |||||TEST||
9|1|1||Terry|a|Willis|||1961020|||||| 315 | E | Sutton | Street | || |Fayetteville|AR| 72701 | ||| |||||TEST||
10|1|1||Robert|W|Travillian|||19610222|||||| 249 ||Murdoch|Street||||||51035| ||| |||||TEST||
11|1|1||Robert|W|Travillian|||19610222|||||||||||||||| ||| |||||TEST||


If I sort on the 10th pipe delimited field using the command:

sort -t\| -k 10  source.dat


I get the following result:


7|1|1||MARY||JONES   |||19610202|||||| 1400 |N | eastwood | drive | || |Fayetteville|AR| 72701 | ||| |||||TEST||
5|1|1||MARY||JONES   |||19610203|||||| 1400 |N | eastwood | drive | || |Fayetteville|AR| 72701 | ||| |||||TEST||
9|1|1||Terry|a|Willis|||1961020|||||| 315 | E | Sutton | Street | || |Fayetteville|AR| 72701 | ||| |||||TEST||
1|1|1||Terry|a|Willis|||19610203|||||| 315 | E | Sutton | Street | || |Fayetteville|AR| 72701 | ||| |||||TEST||
3|1|1||Andy||smith   |||19610203|||||| 315 | | Willow | Street | || |Fayetteville|AR| 72701| ||| |||||TEST||
2|1|1||Terry| |Willis|||19610204|||||| 315 | E | Sutton | Street | || |Fayetteville|AR|72701 | ||| |||||TEST|| 
10|1|1||Robert|W|Travillian|||19610222|||||| 249 ||Murdoch|Street||||||51035| ||| |||||TEST||
11|1|1||Robert|W|Travillian|||19610222|||||||||||||||| ||| |||||TEST||
4|1|1||Andy||smith   |||19610302|||||| 315 | | Willow | Street | || |Fayetteville|AR| 72701 | ||| |||||TEST||
8|1|1||MARY||JONES   |||19615292|||||| 1400 |N | eastwood | drive | || |Fayetteville|AR| 72701 | ||| |||||TEST||
6|1|1||MARY||JONES   |||19660203|||||| 1400 |N | eastwood | drive | || |Fayetteville|AR| 72701 | ||| |||||TEST||


Note in particular the location of record 9.

This occurs in Centos4 and Ubuntu 9.04 and RHEL5.5

__________________________________________________________________________________

Thomas A. J. Schweiger, PhD, PE  |  Acxiom Global Consulting Services 
535 Research Center Blvd.
Fayetteville, AR 72701
(501) 342-6294

***************************************************************************
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be legally
privileged.

If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.

Thank You.
****************************************************************************
[Message part 2 (text/html, inline)]

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

Previous Next


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