ls --color no longer emits the final 3-byte color-resetting escape
sequence when it would be a no-op.
+ join -t '' no longer emits an error and instead operates on
+ each line as a whole (even if they contains NUL characters).
+
* Noteworthy changes in release 8.4 (2010-01-13) [stable]
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
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}
separated by CHAR.\n\
\n\
Important: FILE1 and FILE2 must be sorted on the join fields.\n\
-E.g., use `sort -k 1b,1' if `join' has no options.\n\
+E.g., use ` sort -k 1b,1 ' if `join' has no options,\n\
+or use ` join -t '' ' if `sort' has no options.\n\
Note, comparisons honor the rules specified by `LC_COLLATE'.\n\
If the input is not sorted and some lines cannot be joined, a\n\
warning message will be given.\n\
{
unsigned char newtab = optarg[0];
if (! newtab)
- error (EXIT_FAILURE, 0, _("empty tab"));
- if (optarg[1])
+ newtab = '\n'; /* '' => process the whole line. */
+ else if (optarg[1])
{
if (STREQ (optarg, "\\0"))
newtab = '\0';
['3a', '-t:', ["a:1\nb:1\n", "a:2:\nb:2:\n"], "a:1:2:\nb:1:2:\n", 0],
+# operate on whole line (as sort does by default)
+['3b', '-t ""', ["a 1\nb 1\n", "a 1\nb 2\n"], "a 1\n", 0],
+# use NUL as the field delimiter
+['3c', '-t "\\0"', ["a\0a\n", "a\0b\n"], "a\0a\0b\n", 0],
+
# Just like -a1 and -a2 when there are no pairable lines
['4a', '-v 1', ["a 1\n", "b\n"], "a 1\n", 0],
['4b', '-v 2', ["a 1\n", "b\n"], "b\n", 0],