summaryrefslogtreecommitdiff
path: root/doc/coreutils.texi
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-03-27 15:55:55 +0000
committerJim Meyering <jim@meyering.net>2003-03-27 15:55:55 +0000
commitbfaee25d1f20412a646250a10870b51d238d2054 (patch)
tree8e26da4bc6b8de3ef609a422de6e7cb6b78bc8c8 /doc/coreutils.texi
parent9ad2c98a28112eb041caf04f42cfd55b4f2fd892 (diff)
downloadcoreutils-bfaee25d1f20412a646250a10870b51d238d2054.tar.xz
(sort invocation): Describe sort's --stable (-s) option.
Diffstat (limited to 'doc/coreutils.texi')
-rw-r--r--doc/coreutils.texi18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 43499b1f1..9cecd2c48 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -3028,6 +3028,24 @@ On newer systems, @option{-o} cannot appear after an input file if
scripts should specify @option{-o @var{output-file}} before any input
files.
+@item -s
+@itemx --stable
+@opindex -s
+@opindex --stable
+@cindex sort stability
+@cindex disabling sort's last-resort comparison
+
+Make @command{sort} stable by disabling the last-resort
+comparison that is performed in some cases.
+By default, when lines compare equal based on command line options
+that affect ordering, those lines are ordered using
+a @dfn{last-resort comparison} that takes the entire
+line as the key and acts as if no ordering options were specified.
+But if @option{--reverse} (@option{-r}) was specified along with other
+ordering options, then the last-resort comparison does use @option{--reverse}.
+In any case, when no ordering option is specified or when only
+@option{--reverse} is specified, the last-resort comparison is not performed
+
@item -S @var{size}
@itemx --buffer-size=@var{size}
@opindex -S