[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51011: [GNU sort] Numerical sort with delimiter may be broken (bug)
From: |
Davide Brini |
Subject: |
bug#51011: [GNU sort] Numerical sort with delimiter may be broken (bug) |
Date: |
Mon, 4 Oct 2021 17:18:35 +0200 |
On Mon, 4 Oct 2021 10:36:52 -0400, Juncheng Yang
<peter.waynechina@gmail.com> wrote:
> Hi coreutils developers,
> I have encountered a bug in GNU sort in which sort produces incorrect
> results when numerical sort with delimiters. For example, sort -nk1 -t ,
> file cannot sort the a file with the following lines (sort by the first
> column numerically)
> 1,a
> 0,9
>
> I have tried multiple version including the latest version, this problem
> still exists.
Works for me with
sort -t, -k1,1n
Keep in mind that with just "-k1" you're effectively telling sort to
consider fields from the first up to the last (ie the whole line), not just
the first one.
--
D.
- bug#51011: [GNU sort] Numerical sort with delimiter may be broken (bug), Juncheng Yang, 2021/10/04
- bug#51011: [GNU sort] Numerical sort with delimiter may be broken (bug),
Davide Brini <=
- bug#51011: [GNU sort] Numerical sort with delimiter may be broken (bug), Pádraig Brady, 2021/10/04
- bug#51011: [GNU sort] Numerical sort with delimiter may be broken (bug), Paul Eggert, 2021/10/04
- bug#51011: [GNU sort] Numerical sort with delimiter may be broken (bug), Juncheng Yang, 2021/10/04
- bug#51011: [GNU sort] Numerical sort with delimiter may be broken (bug), Pádraig Brady, 2021/10/08
- bug#51011: [GNU sort] Numerical sort with delimiter may be broken (bug), Paul Eggert, 2021/10/08
- bug#51011: [GNU sort] Numerical sort with delimiter may be broken (bug), Pádraig Brady, 2021/10/08
- bug#51011: [GNU sort] Numerical sort with delimiter may be broken (bug), Paul Eggert, 2021/10/08
- bug#51011: [GNU sort] Numerical sort with delimiter may be broken (bug), Pádraig Brady, 2021/10/09
- bug#51011: [GNU sort] Numerical sort with delimiter may be broken (bug), Paul Eggert, 2021/10/09
- bug#51011: [PATCH] sort: --debug: add warnings about radix and grouping chars, Pádraig Brady, 2021/10/10