Re: confusion with sort

"Mickey Ferguson" <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization Aioe.org NNTP Server
Message-ID <[email protected]>
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" <[email protected]> wrote in message 
news:[email protected]...

> 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."
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.