summaryrefslogtreecommitdiff
path: root/doc/coreutils.texi
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2011-01-27 07:17:16 +0000
committerPádraig Brady <P@draigBrady.com>2011-01-29 23:39:16 +0000
commit877ca5bf8588ae73a6ccc672e41f13c5b3943b14 (patch)
treeaecfb3505bf785ccb775305fb49bf89d712b0fa9 /doc/coreutils.texi
parent32626bde6d68508109a99dfe0a089a0025f56085 (diff)
downloadcoreutils-877ca5bf8588ae73a6ccc672e41f13c5b3943b14.tar.xz
join: don't report disorder against an empty file
This allows one to use join as a field extractor like: join -a1 -o 1.3,1.1 - /dev/null * src/join.c (join): Don't flag unpairable lines when one of the files is empty. * tests/misc/join: Add a new test for empty input, and adjust a previous test that was only checking against empty input. * doc/coreutils.texi (join invocation): Document the change. * NEWS: Likewise.
Diffstat (limited to 'doc/coreutils.texi')
-rw-r--r--doc/coreutils.texi18
1 files changed, 13 insertions, 5 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index d6e98c6d6..b89147ea8 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -4787,11 +4787,17 @@ If there is an error it exits with nonzero status.
@macro checkOrderOption{cmd}
If the @option{--check-order} option is given, unsorted inputs will
cause a fatal error message. If the option @option{--nocheck-order}
-is given, unsorted inputs will never cause an error message. If
-neither of these options is given, wrongly sorted inputs are diagnosed
-only if an input file is found to contain unpairable lines. If an
-input file is diagnosed as being unsorted, the @command{\cmd\} command
-will exit with a nonzero status (and the output should not be used).
+is given, unsorted inputs will never cause an error message. If neither
+of these options is given, wrongly sorted inputs are diagnosed
+only if an input file is found to contain unpairable
+@ifset JOIN_COMMAND
+lines, and when both input files are non empty.
+@end ifset
+@ifclear JOIN_COMMAND
+lines.
+@end ifclear
+If an input file is diagnosed as being unsorted, the @command{\cmd\}
+command will exit with a nonzero status (and the output should not be used).
Forcing @command{\cmd\} to process wrongly sorted input files
containing unpairable lines by specifying @option{--nocheck-order} is
@@ -5672,7 +5678,9 @@ c c1 c2
b b1 b2
@end example
+@set JOIN_COMMAND
@checkOrderOption{join}
+@clear JOIN_COMMAND
The defaults are:
@itemize