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."