summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2010-02-01 15:19:08 +0000
committerPádraig Brady <P@draigBrady.com>2010-02-01 15:36:56 +0000
commitf86bb6967dba1e2b6026997963a90e00cd641490 (patch)
tree0b4451e967924bfba4c42f9c819c0e33b1b53c95 /doc
parent819aa9eba741c36bb522cbc2c7f10e24d190f945 (diff)
downloadcoreutils-f86bb6967dba1e2b6026997963a90e00cd641490.tar.gz
join: make -t '' operate on the whole line
Previously passing an empty parameter to -t would raise an error, but now it means to treat each line as a single field for matching. This matches the default operation of `sort` which is usually used in conjunction with join. * src/join.c (main): Set the field delimiter to '\n' if an empty parameter is passed to -t. (usage): Mention the operation of -t ''. * tests/misc/join: Add 2 new tests, for the existing -t '\0' and the new -t '' functionality. * doc/coreutils.texi (join invocation): Mention that join -t '' always operates on the whole line, while join -t '\0' usually does. * NEWS: Mention the change in behavior.
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi7
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 2b3d32b94..e3e95f5b6 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -5462,6 +5462,8 @@ locales and options if the output of @command{sort} is fed to
sort a file on its default join field, but if you select a non-default
locale, join field, separator, or comparison options, then you should
do so consistently between @command{join} and @command{sort}.
+If @samp{join -t ''} is specified then the whole line is considered which
+matches the default operation of sort.
If the input has no unpairable lines, a @acronym{GNU} extension is
available; the sort order can be any order that considers two fields
@@ -5572,7 +5574,10 @@ option---are subject to the specified @var{field-list}.
Use character @var{char} as the input and output field separator.
Treat as significant each occurrence of @var{char} in the input file.
Use @samp{sort -t @var{char}}, without the @option{-b} option of
-@samp{sort}, to produce this ordering.
+@samp{sort}, to produce this ordering. If @samp{join -t ''} is specified,
+the whole line is considered, matching the default operation of sort.
+If @samp{-t '\0'} is specified then the @acronym{ASCII} @sc{nul}
+character is used to delimit the fields.
@item -v @var{file-number}
Print a line for each unpairable line in file @var{file-number}