By the way, you can get the other behavior with the --stable option.

>From `info sort':

     Finally, as a last resort when all keys compare equal (or if no
  ordering options were specified at all), `sort' compares the entire
  lines.  The last resort comparison honors the `--reverse' (`-r') global
  option.  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.  If no fields or global options are
  specified, `--stable' (`-s') has no effect.

Hmm... I've just noticed that there isn't an entry in the texinfo
documentation describing that option.  Yet another item for the TODO list :-)

Hendrik Visage <[EMAIL PROTECTED]> wrote:
> Hi there, below is a "issue" I would believe that sort should
> handle "correctly" as per the xpg4 versions, not the SVR4 version
> of sort (Or is that POSIX correct") to take -k 1,1 as the whole line.
> Is there a way to force sort to handle -k 1,1 the same way as -k 2,2??


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to