[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sort "in"compatibilities with xpg4...
From: |
Jim Meyering |
Subject: |
Re: Sort "in"compatibilities with xpg4... |
Date: |
Fri, 21 Mar 2003 16:26:28 +0100 |
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 <address@hidden> 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??