Subject: bin/24316: /usr/bin/sort -k failure
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <mlh@goathill.org>
List: netbsd-bugs
Date: 02/04/2004 12:33:57
>Number: 24316
>Category: bin
>Synopsis: sort -k fails to sort properly
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 04 18:35:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: MLH
>Release: NetBSD 1.6ZI
>Organization:
none
>Environment:
System: NetBSD tiamat.goathill.org 1.6ZI NetBSD 1.6ZI (APMVIA) #0: Fri Jan 30 13:13:58 CST 2004 mlh@enki.goathill.org:/opt/obj/usr/src/sys/arch/i386/compile/APMVIA i386
Architecture: i386
Machine: i386
>Description:
Numeric field sorts are not sorted correctly by /usr/bin/sort.
>How-To-Repeat:
sort-bug-test-file:
1.000 1.000
1.000
1.000 1.000
1.000
0.000 1.000
1.000
1.000 1.000
0.000 1.000
1.000
$ /usr/bin/sort -t: -k1.7,1.12n -k1.1,1.6n sort-bug-test-file
1.000
1.000
0.000 1.000
1.000
0.000 1.000
1.000
1.000 1.000
1.000 1.000
1.000 1.000
$ /usr/bin/sort -t: -k1.7,1.12nr -k1.1,1.6nr sort-bug-test-file
1.000
1.000
0.000 1.000
1.000
0.000 1.000
1.000
1.000 1.000
1.000 1.000
1.000 1.000
$ /usr/bin/sort -t: -k1.7,1.12 -k1.1,1.6 sort-bug-test-file
1.000
1.000
1.000
1.000
0.000 1.000
0.000 1.000
1.000 1.000
1.000 1.000
1.000 1.000
$ /usr/bin/sort -t: -k1.7,1.12r -k1.1,1.6r sort-bug-test-file
1.000 1.000
1.000 1.000
1.000 1.000
0.000 1.000
0.000 1.000
1.000
1.000
1.000
1.000
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: