bug-coreutils
[Top][All Lists]
Advanced

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

Possible bug in "sort"


From: Béla Horváth
Subject: Possible bug in "sort"
Date: Thu, 09 Aug 2007 15:18:42 +0200

Dear All,

I have a problem with "sort" (I tested it on ubuntu 7.04, on Mac OSX, and on 
AIX too, and they are identical)

I try to sort the attached file. Field separator is <tab>, but in the timestamp 
field between date and time there is a <space>, not a <tab>. 
I have to sort as first key for timestamp (field 3) - "string like", and as 
second key for sequence number, (field 6) - "numeric like".

sort -t\<tab> -k3 ts.txt
works fine for field 3, if I use the second key.

sort -t\<tab> -k3 -k6n ts.txt
k3 works fine, but k6 works not numerically. If I test only to sort for k6

sort -t\<tab> -k6n ts.txt
it seams to be correct, but not together. After this I tried to use
the -n global option:

sort -t\<tab> -n -k3 -k6n ts.txt
the sort for k3 will be no more correct (see the line in the last
field marked with xxx) if I try -k3b or -k3d instead of -k3 , the
result will be the same.  But if I take the global -b option too,

sort -t\<tab> -b -n -k3 -k6n ts.txt
then k3 will be OK, but k6 will not be sorted numerically anymore.

I think, it might be a bug.

Best wishes:
Bela Horvath
-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

Attachment: ts.txt
Description: Text document


reply via email to

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