Subject: bug#42211: closed (Re: bug#42211: Problem in sort)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 06 Jul 2020 20:32:02 +0000

Your bug report

#42211: Problem in sort

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
42211: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42211
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#42211: Problem in sort
From: Paul Eggert <[email-masked]>
To: Richard Freedman <[email-masked]>
Cc: [email-masked]
Date: Mon, 6 Jul 2020 13:31:42 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

On 7/5/20 9:53 PM, Richard Freedman wrote:

> I discovered that trying to use -c with --debug causes an error - but not in the version that I have
> on my mac laptop !

Ah, I had meant to suggest using --debug without -c.

> when I try to specify a "key" even for a file with only 1 column - the program stops on consecutive entries
> that are identical.

When all keys compare equal, 'sort' falls back on a last-resort comparison of
the entire line to break ties, and it's finding that your lines are out of
order. You don't want 'sort' to do that, so you should specify the -s (--stable)
option. -s is a GNU extension.

Closing the bug report, as this should fix the problem for you.

Subject: Problem in sort
From: Richard Freedman <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Sat, 4 Jul 2020 21:39:46 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

When I use sort -n -c on a specified column in a file sort reports an error and then stops if two numbers are exactly the same. I want the sort to find actual sort errors, i.e. number (n+1) < number(n). This negates the use of sort -n -c on large files to find files that are actually out of order. Any way to fix this ?

regards,

Richard Freedman
[email-masked]<mailto:[email-masked]>

[email-masked]<mailto:[email-masked]>