I'd like to sort a file with 9 integer values per line according
to the values of the first three "columns" and in the natural integer order.
The result would look like
-4 -4 -4 .....
...
-4 -4 -3 .....
-3 -4 -4 ....
Using
sort -k 1n,3n ....
or
sort -n 1,3
sorts only the first column (first integer) correctly in the order
from -5,-4,-3,-2,-1,0,1,2..., but the 2nd and 3rd column in the order
-1,-2,-3,-4,...0,1,2,3 (mixes up the ordering for the 2nd and 3rd column).
We're using /usr/bin/sort in the version of
98 1.60 src/bos/usr/bin/sort/sort.c, cmdfiles, bos41c, 9536A 9/1/95
under AIX 1 4 000033727900. Is there a trick to achieve ordering
with the natural order for integers for all columns of the input?
--