Thank you, Paul! :)
In my test, the -k option of the sort on Mac behaves differently from GNU sort
(I made a mistake stating -n). In other words,
printf '%s\n' 1,a 0,9 | sort -nk1 -t ,
works on Mac, and this is why I thought GNU sort has a bug at first.
Thank you again for your quick response!
Thank you, Paul and Padraig!
May I ask when it fails to sort numerically why 1,a comes before 0,9? I could
not come up with an ordering that 1,a is smaller.
Best,
Jason
> On Oct 4, 2021, at 4:01 PM, Paul Eggert wrote:
>
> On 10/4/21 08:58, Pádraig Brady wrote:
>> The --debug option point
On 10/4/21 13:31, Chris Murphy wrote:
Is the primary
target audience for human-readable values humans? Or scripts
Both.
Output columns are at a premium, so there is some advantage to omitting
the units suffix (plus a lot of tradition for omission, outside of
coreutils).
On Fri, Oct 1, 2021 at 12:19 PM Pádraig Brady wrote:
>
> On 01/10/2021 14:28, Danie de Jager wrote:
> > Hi,
> >
> > The output from df -h and df -H is always G or M. Depending on who sends me
> > usage stats I have to ask how the command was run to make sure I calculate
> > usage correctly. System
On 10/4/21 08:29, Juncheng Yang wrote:
However, this is confusing because 1) the behavior of `-n` and `-g` are not
consistent
Yes, that is confusing. I have followed up to Pádraig about this.
, 2) the `-n` in GNU sort is different from the sort on MacOS (which has
pos2 as pos1+1 instead of 0
On 10/4/21 08:58, Pádraig Brady wrote:
The --debug option points out the issue:
$ printf '%s\n' 1,a 0,9 | sort --debug -nk1 -t ,
sort: key 1 is numeric and spans multiple fields
1,a
_
___
0,9
___
___
As Juncheng points out, it is a bit odd that -n and -g disagree here,
Hi Paul,
Thanks for your consideration. I understand your concern about causing
confusion with set aliases. In that case I agree, create a new option
instead.
Regards,
Danie
On Fri, 1 Oct 2021 at 23:01, Paul Eggert wrote:
> On 10/1/21 1:30 PM, Danie de Jager wrote:
> > Can we use the same opti
Hi developers,
It looks like I had misunderstanding of how `-k` works, by changing to -k
1,1 now it works.
However, this is confusing because 1) the behavior of `-n` and `-g` are not
consistent, 2) the `-n` in GNU sort is different from the sort on MacOS (which
has pos2 as pos1+1 inste
tag 51011 notabug
close 51011
stop
On 04/10/2021 15:36, Juncheng Yang 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 followin
On Mon, 4 Oct 2021 10:36:52 -0400, Juncheng Yang
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
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 multipl
11 matches
Mail list logo