emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-bug-tracker] bug#7323: closed (sort bug)


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#7323: closed (sort bug)
Date: Wed, 03 Nov 2010 15:59:02 +0000

Your message dated Wed, 03 Nov 2010 16:03:09 +0000
with message-id <address@hidden>
and subject line Re: bug#7323: sort bug
has caused the GNU bug report #7323,
regarding sort bug
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
7323: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7323
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: sort bug Date: Wed, 03 Nov 2010 09:52:25 -0500
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.
****************************************************************************

--- End Message ---
--- Begin Message --- Subject: Re: bug#7323: sort bug Date: Wed, 03 Nov 2010 16:03:09 +0000 User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3
On 03/11/10 14:52, Thomas A Schweiger wrote:
> 
> I have found an anomaly in the sort utility.
> 
> If I sort on the 10th pipe delimited field using the command:
> 
> sort -t\| -k 10  source.dat

That sorts from the 10th field on.
If you just want the 10th field then use -k10,10
If the field is numeric (and not fixed width) use -k10,10n

cheers,
Pádraig.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]