bug-coreutils
[Top][All Lists]
Advanced

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

different behavior of sort


From: Sheila Yao
Subject: different behavior of sort
Date: Mon, 18 Jan 2010 14:32:56 -0500

At one box, I've sort version 5.2.1 and sort works correctly. At another box 
with sort 5.97, it doesn't work correctly.
Please see below.
sort (coreutils) 5.2.1
Written by Mike Haertel and Paul Eggert.

Copyright (C) 2004 Free Software Foundation, Inc.

It works correctly for this output:
cat /tmp/tosort.out
/dev/emcpowera         47G   39G  7.8G  84% /DB1/DW/data9
/dev/emcpowerb         47G   43G  4.2G  91% /DB1/DW/data10
/dev/emcpowerc         46G  181M   46G   1% /DB1/DW/dwtmp16
/dev/emcpowerh         70G   30G   40G  43% /DB1/DW/data6
/dev/emcpoweri         70G   68G  2.2G  97% /DB1/DW/data7
/dev/emcpowerj         70G   68G  2.1G  97% /DB1/DW/data8
/dev/emcpowerl        540G  420G  121G  78% /DB1/DW/data3
/dev/emcpowerm        540G  420G  121G  78% /DB1/DW/data5
/dev/emcpowern         23G   14G  9.4G  59% /DB1/DW/data4
/dev/emcpowero        540G  509G   32G  95% /DB1/DW/data2
/dev/emcpoweru        600G  408G  193G  68% /DB1/DW/data1
/dev/emcpowerw        183G   32G  152G  18% /DB1/DW/LOGARCH
/dev/emcpowery         92G  188M   92G   1% /DB1/DW/LOGACT

cat /tmp/tosort.out | sort -n -k2.1,2.4
/dev/emcpowern         23G   14G  9.4G  59% /DB1/DW/data4
/dev/emcpowerc         46G  181M   46G   1% /DB1/DW/dwtmp16
/dev/emcpowera         47G   39G  7.8G  84% /DB1/DW/data9
/dev/emcpowerb         47G   43G  4.2G  91% /DB1/DW/data10
/dev/emcpowerh         70G   30G   40G  43% /DB1/DW/data6
/dev/emcpoweri         70G   68G  2.2G  97% /DB1/DW/data7
/dev/emcpowerj         70G   68G  2.1G  97% /DB1/DW/data8
/dev/emcpowery         92G  188M   92G   1% /DB1/DW/LOGACT
/dev/emcpowerw        183G   32G  152G  18% /DB1/DW/LOGARCH
/dev/emcpowerl        540G  420G  121G  78% /DB1/DW/data3
/dev/emcpowerm        540G  420G  121G  78% /DB1/DW/data5
/dev/emcpowero        540G  509G   32G  95% /DB1/DW/data2
/dev/emcpoweru        600G  408G  193G  68% /DB1/DW/data1

At another box, I've sort version 5.97 and it doesn't work correctly:
sort (GNU coreutils) 5.97
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and Paul Eggert.

cat /tmp/tosort.out | sort -n -k2.1,2.4
/dev/emcpowera         47G   39G  7.8G  84% /DB1/DW/data9
/dev/emcpowerb         47G   43G  4.2G  91% /DB1/DW/data10
/dev/emcpowerc         46G  181M   46G   1% /DB1/DW/dwtmp16
/dev/emcpowerh         70G   30G   40G  43% /DB1/DW/data6
/dev/emcpoweri         70G   68G  2.2G  97% /DB1/DW/data7
/dev/emcpowerj         70G   68G  2.1G  97% /DB1/DW/data8
/dev/emcpowerl        540G  420G  121G  78% /DB1/DW/data3
/dev/emcpowerm        540G  420G  121G  78% /DB1/DW/data5
/dev/emcpowern         23G   14G  9.4G  59% /DB1/DW/data4
/dev/emcpowero        540G  509G   32G  95% /DB1/DW/data2
/dev/emcpoweru        600G  408G  193G  68% /DB1/DW/data1
/dev/emcpowerw        183G   32G  152G  18% /DB1/DW/LOGARCH
/dev/emcpowery         92G  188M   92G   1% /DB1/DW/LOGACT

Thanks.

Have a nice day,

Sheila



reply via email to

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