Summary: | sort doesn't handle old key notation properly | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Rodrigo Osorio <rodrigo> | ||||
Component: | bin | Assignee: | Baptiste Daroussin <bapt> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Many People | CC: | emaste | ||||
Priority: | Normal | ||||||
Version: | CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
A commit references this bug: Author: bapt Date: Thu Oct 2 06:29:49 UTC 2014 New revision: 272398 URL: https://svnweb.freebsd.org/changeset/base/272398 Log: Make sure to not skip any argument when converting from deprecated +POS1, -POS2 to -kPOS1,POS2, so that sort +0n gets translated to sort -k1,1n as it is expected PR: 193994 Submitted by: rodrigo MFC after: 3 days Changes: head/usr.bin/sort/sort.c A commit references this bug: Author: bapt Date: Mon Oct 6 09:15:10 UTC 2014 New revision: 272603 URL: https://svnweb.freebsd.org/changeset/base/272603 Log: MFC: r272398 Make sure to not skip any argument when converting from deprecated +POS1, -POS2 to -kPOS1,POS2, so that sort +0n gets translated to sort -k1,1n as it is expected PR: 193994 Submitted by: rodrigo MFC after: 3 days Changes: _U stable/10/ stable/10/usr.bin/sort/sort.c A commit references this bug: Author: bapt Date: Mon Oct 6 12:08:15 UTC 2014 New revision: 272611 URL: https://svnweb.freebsd.org/changeset/base/272611 Log: MFC: r272398 Make sure to not skip any argument when converting from deprecated +POS1, -POS2 to -kPOS1,POS2, so that sort +0n gets translated to sort -k1,1n as it is expected PR: 193994 Submitted by: rodrigo Approved by: re (marius) Changes: _U releng/10.1/ releng/10.1/usr.bin/sort/sort.c |
Created attachment 147749 [details] patch for head The bsd sort doesn't handle properly old notation for keys,and in some cases the conversion function skips last argument. 'sort +0n' is converted in 'sort -k1,1' loosing the ability to perform a numeric sort.