help-gnu-utils
[Top][All Lists]
Advanced

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

Re: confusion with sort


From: Mickey Ferguson
Subject: Re: confusion with sort
Date: Thu, 3 Apr 2008 09:12:39 -0700

Thanks, that seems to have done the trick.  I never noticed in the 
documentation that it states:

"A pair of lines is compared as follows: sort compares each pair of fields, 
in the order specified on the command line, according to the associated 
ordering options, until a difference is found or no fields are left. If no 
key fields are specified, sort uses a default key of the entire line. 
Finally, as a last resort when all keys compare equal, sort compares entire 
lines as if no ordering options other than --reverse (-r) were specified. 
The --stable (-s) option disables this last-resort comparison so that lines 
in which all fields compare equal are left in their original relative 
order."

That last part that begins with Finally... is the part I missed.

"Kam-Hung Soh" <kamhung.soh@gmail.com> wrote in message 
749e9724-397b-4a7f-accb-496e11393eff@r9g2000prd.googlegroups.com">news:749e9724-397b-4a7f-accb-496e11393eff@r9g2000prd.googlegroups.com...

> Try adding the "-s" option, which "... disables this last-resort
> comparison so that lines in which all fields compare equal are left in
> their original relative order."




reply via email to

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