Hi,
for the following input:
42 1 3 woot
42 1 010 zoology
egg 1 2 papyrus
7 3 42 soup
999 3 0 algebra
this is what debug-enabled sort in coreutils 8.22 outputs:
% sort --debug ./input -k2,3n
sort: using simple byte comparison
sort: key 1 is numeric and spans multiple fields
42 1 010 zoology
_
_______________________________
42 1 3 woot
_
____________________________
egg 1 2 papyrus
_
_______________________________
7 3 42 soup
_
____________________________
999 3 0 algebra
_
_______________________________
It seems as if only the second field was used in comparison, even
though sort knows that the key 'spans multiple fields'. Is this a
correct behaviour? If so - could anyone explain why?
Best regards,
Bartosz Gołaszewski