Package: coreutils Version: 5.97-5 Whilst testing a patch for Busybox sort, I encountered this bug in GNU sort.
$ sort -k4.2,4.4 test 999 3 0 algebra egg 1 2 papyrus 7 3 42 soup 42 1 3 woot 42 1 010 zoology $ sort -k4.3,4.5 test egg 1 2 papyrus 999 3 0 algebra 42 1 010 zoology 42 1 3 woot 7 3 42 soup In the first example, sort should, according to the info page, take the second to fourth character of the fourth field, but instead it sorts on the first letter. Only if the character limits are increased by one do I get the correct result. I suspect that a delimiter character (space?) is included at the start of the string and that that is counted as the first character. Cheers, FJP
pgpPgdtH9q5y2.pgp
Description: PGP signature