Bug 14871 - sort: `sort -s -u -k 2' didn't remove duplicate lines
Summary: sort: `sort -s -u -k 2' didn't remove duplicate lines
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-25 14:13 UTC by Zhang Boyang
Modified: 2022-07-29 14:40 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zhang Boyang 2022-06-25 14:13:03 UTC
Hi,

Please run `LANG=C sort -s -u -k 2' with following input data:
z b
a b
z a
a a

The output of busybox's sort is:
z a
a a
z b
a b

The expected output (from GNU sort) is:
z a
z b
Comment 1 Zhang Boyang 2022-06-25 14:30:31 UTC
(In reply to Zhang Boyang from comment #0)
Comment 2 Denys Vlasenko 2022-07-29 14:40:29 UTC
Fixed in git