[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23673: wrong sorting order
From: |
alainm |
Subject: |
bug#23673: wrong sorting order |
Date: |
Wed, 1 Jun 2016 15:16:55 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
Hi
I need to perform a sort based on the first 3 indexes of a line (sort
-k 1,3 -n truc.lst):
The 0 coordinates are not placed before the 2 coordinates, it looks like
the spaces are ignore:
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.
Cheer
Alain
- bug#23673: wrong sorting order,
alainm <=