diff options
author | Pádraig Brady <P@draigBrady.com> | 2011-01-27 07:17:16 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2011-01-29 23:39:16 +0000 |
commit | 877ca5bf8588ae73a6ccc672e41f13c5b3943b14 (patch) | |
tree | aecfb3505bf785ccb775305fb49bf89d712b0fa9 /doc | |
parent | 32626bde6d68508109a99dfe0a089a0025f56085 (diff) | |
download | coreutils-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')
-rw-r--r-- | doc/coreutils.texi | 18 |
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 |