summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2007-01-24 09:06:57 +0100
committerJim Meyering <jim@meyering.net>2007-01-24 09:06:57 +0100
commita0b2bc8de7c1363f2fe85dd11d28d2b1e68c9d32 (patch)
treee88361b9764c7e197f7a6ecff2971555ee99c078 /doc
parenta0d74a99b786511d037b7fc00038c4cf55151c3a (diff)
downloadcoreutils-a0b2bc8de7c1363f2fe85dd11d28d2b1e68c9d32.tar.xz
* NEWS: New option sort -C, proposed by XCU ERN 127, which looks
like it will be approved. Also add --check=quiet, --check=silent as long aliases, and --check=diagnose-first as an alias for -c. * doc/coreutils.texi (sort invocation): Document this. Also, mention that sort -c can take at most one file. * src/sort.c: Implement this. Include argmatch.h. (usage): Document the change. (CHECK_OPTION): New constant. (long_options): --check now takes an optional argument, and is now treated differently from 'c'. (check_args, check_types): New constant arrays. (check): New arg CHECKONLY, which suppresses diagnostic if -C. (main): Parse the new options. * tests/sort/Test.pm (02d, 02d, incompat5, incompat6): New tests for -C.
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi22
1 files changed, 18 insertions, 4 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 1abf45dbf..ff049bcf7 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -3342,12 +3342,26 @@ mode:
@item -c
@itemx --check
+@itemx --check=diagnose-first
@opindex -c
@opindex --check
@cindex checking for sortedness
-Check whether the given files are already sorted: if they are not all
-sorted, print an error message and exit with a status of 1.
+Check whether the given file is already sorted: if it is not all
+sorted, print a diagnostic containing the first out-of-order line and
+exit with a status of 1.
Otherwise, exit successfully.
+At most one input file can be given.
+
+@item -C
+@itemx --check=quiet
+@itemx --check=silent
+@opindex -c
+@opindex --check
+@cindex checking for sortedness
+Exit successfully if the given file is already sorted, and
+exit with status 1 otherwise.
+At most one input file can be given.
+This is like @option{-c}, except it does not print a diagnostic.
@item -m
@itemx --merge
@@ -3401,7 +3415,7 @@ Exit status:
@display
0 if no error occurred
-1 if invoked with @option{-c} and the input is not properly sorted
+1 if invoked with @option{-c} or @option{-C} and the input is not sorted
2 if an error occurred
@end display
@@ -3716,7 +3730,7 @@ disks and controllers.
@cindex uniquifying output
Normally, output only the first of a sequence of lines that compare
-equal. For the @option{--check} (@option{-c}) option,
+equal. For the @option{--check} (@option{-c} or @option{-C}) option,
check that no pair of consecutive lines compares equal.
This option also disables the default last-resort comparison.