bug-textutils
[Top][All Lists]
Advanced

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

Apparent bug in sort command


From: Robert K. Nelson
Subject: Apparent bug in sort command
Date: Fri, 11 Jan 2002 10:11:28 -0500

Program: sort (textutils)

Version: 2.0.14

Operating System: Linux (RH 7.2 running the 2.4.7-10smp kernel)

Hardware: Dual Processor 400 MHz Intel P5

Problem: the -n option doesn't appear to work correctly when character offsets
are given in the -k field

Example: give the command

sort -n -k4.5 <bug

where "bug" contains the following lines

0     0     30    Lat_5                  2.637e-01  
1     19    32    Lat_7                  2.634e-01  
2     21    33    Lat_8                  2.650e-01  
22    16    27    Lat_2                  2.783e-01  
23    20    28    Lat_3                  2.682e-01  
24    17    29    Lat_4                  2.652e-01  
25    18    31    Lat_6                  2.630e-01  
3     22    34    Lat_9                  2.687e-01  
4     23    35    Lat_10                 2.735e-01  
5     24    36    Lat_11                 2.801e-01  
50    51    15    Lat_1                  2.789e-01  
6     25    37    Lat_12                 2.897e-01  
7     26    38    Lat_13                 2.886e-01  

This should sort the lines from "Lat_1" to Lat_13", but it leaves them unsorted.
Note that the HP-UX 11.0 version of sort works as expected.
This bug also appears in the 2.0e version of the code.

Bob
-- 
Robert K. Nelson
Airflow Sciences Corporation
37501 Schoolcraft Road, Livonia, MI  48150-1009
(734) 464-8900   FAX (734) 464-5879  www.airflowsciences.com



reply via email to

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