bug-obsolete-packages
[Top][All Lists]
Advanced

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

[bug-obsolete-packages] Bug with numeric sort


From: alainm
Subject: [bug-obsolete-packages] Bug with numeric sort
Date: Wed, 1 Jun 2016 14:42:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

Hi,

I need a numerical/alphabetical sort on the ached input file on the first 3 indexes:

$  sort  -k 1,3 -n  partial.lst

But the result is incorrectly sorted (maybe a problem with leading 0s ? or spaces are ignored ? ) as I get 0s sorted after non zero values:
address@hidden 1src]$ more truc.lst
2  9 32 27 1.3925940E-13
0 29 33 33 0.0000000E+00
0 29 33  1 0.0000000E+00
0 29 33  1 0.0000000E+00
0 29 33  1 0.0000000E+00
2  9 32 19 0.0000000E+00
2  9 32 19 0.0000000E+00
2  9 32 27 0.0000000E+00
0 29 33  9 0.0000000E+00
0 29 33  9 0.0000000E+00
0 29 33  9 0.0000000E+00
2  9 32 35 1.4211723E-13
2  9 32 19 1.3592767E-13
0 29 33  1 1.5564060E-13
2  9 32 43 1.4770083E-13
0 29 33 17 0.0000000E+00
0 29 33 17 0.0000000E+00
2  9 32 11 8.4966119E-14
0 29 33 25 0.0000000E+00
2  9 32  3 0.0000000E+00
2  9 32  3 0.0000000E+00
2  9 32  3 0.0000000E+00
2  9 32  3 4.8971061E-14
0 29 33 41 0.0000000E+00
2  9 32 11 0.0000000E+00
2  9 32 11 0.0000000E+00
2  9 32 11 0.0000000E+00
address@hidden 1src]$  sort  -k 1,3 -n truc.lst
2  9 32 11 0.0000000E+00
2  9 32 11 0.0000000E+00
2  9 32 11 0.0000000E+00
2  9 32 11 8.4966119E-14
2  9 32 19 0.0000000E+00
2  9 32 19 0.0000000E+00
2  9 32 19 1.3592767E-13
2  9 32 27 0.0000000E+00
2  9 32 27 1.3925940E-13
2  9 32  3 0.0000000E+00
2  9 32  3 0.0000000E+00
2  9 32  3 0.0000000E+00
2  9 32  3 4.8971061E-14
2  9 32 35 1.4211723E-13
2  9 32 43 1.4770083E-13
0 29 33  1 0.0000000E+00
0 29 33  1 0.0000000E+00
0 29 33  1 0.0000000E+00
0 29 33  1 1.5564060E-13
0 29 33 17 0.0000000E+00
0 29 33 17 0.0000000E+00
0 29 33 25 0.0000000E+00
0 29 33 33 0.0000000E+00
0 29 33 41 0.0000000E+00
0 29 33  9 0.0000000E+00
0 29 33  9 0.0000000E+00
0 29 33  9 0.0000000E+00
address@hidden 1src]$

address@hidden 1src]$  sort --version
sort (GNU coreutils) 8.4
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and Paul Eggert.
address@hidden 1src]$

Thanks

Alain




reply via email to

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