emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42211: closed (Problem in sort)


From: GNU bug Tracking System
Subject: bug#42211: closed (Problem in sort)
Date: Mon, 06 Jul 2020 20:32:02 +0000

Your message dated Mon, 6 Jul 2020 13:31:42 -0700
with message-id <c2b526a1-22dd-4387-35c9-6cb33c065171@cs.ucla.edu>
and subject line Re: bug#42211: Problem in sort
has caused the debbugs.gnu.org bug report #42211,
regarding Problem in sort
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
42211: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42211
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: Problem in sort Date: Sat, 4 Jul 2020 21:39:46 +0000

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

rfreedman@seti.org

 

richard.s.freedman@nasa.gov

 


--- End Message ---
--- Begin Message --- Subject: Re: bug#42211: Problem in sort Date: Mon, 6 Jul 2020 13:31:42 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0
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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]