[Bug 14496] New: 'sort' is not consistent with its coreutils/toybox counterpart

bugzilla at busybox.net bugzilla at busybox.net
Sat Jan 1 15:29:43 UTC 2022


https://bugs.busybox.net/show_bug.cgi?id=14496

            Bug ID: 14496
           Summary: 'sort' is not consistent with its coreutils/toybox
                    counterpart
           Product: Busybox
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5
         Component: Other
          Assignee: unassigned at busybox.net
          Reporter: kasperkantz at outlook.com
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

input:
```
$ cat << EOF | sort -k2rn -s
a 1
b 2
c 1
d 2
EOF
```

result with coreutils and toybox:
```
b 2
d 2
a 1
c 1
```

result with busybox:

```
d 2
b 2
c 1
a 1
```

whereas it should return the lines a, b, c, d according to the documented
behavior of the 'stable' (`-s`) parameter, but instead returns d, b, c, a. It
should reverse the order of the second column only and keep the first in the
same order provided via stdin according to the `-r` flag as the implementation
from GNU coreutils does.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list