mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(join invocation): Mention `sort -k 1b,1'.
This commit is contained in:
1 parent
33637fa804
commit
5bc9231e76
1 file changed
+11
-2
+11
-2
@@ -4738,11 +4738,11 @@ lines that have identical join fields. Synopsis:
|
||||
join [@var{option}]@dots{} @var{file1} @var{file2}
|
||||
@end example
|
||||
|
||||
@vindex LC_COLLATE
|
||||
Either @var{file1} or @var{file2} (but not both) can be @samp{-},
|
||||
meaning standard input. @var{file1} and @var{file2} should be
|
||||
sorted on the join fields.
|
||||
|
||||
@vindex LC_COLLATE
|
||||
Normally, the sort order is that of the
|
||||
collating sequence specified by the @env{LC_COLLATE} locale. Unless
|
||||
the @option{-t} option is given, the sort comparison ignores blanks at
|
||||
@@ -4750,7 +4750,14 @@ the start of the join field, as in @code{sort -b}. If the
|
||||
@option{--ignore-case} option is given, the sort comparison ignores
|
||||
the case of characters in the join field, as in @code{sort -f}.
|
||||
|
||||
However, as a GNU extension, if the input has no unpairable lines the
|
||||
The @command{sort} and @command{join} commands should use consistent
|
||||
locales and options if the output of @command{sort} is fed to
|
||||
@command{join}. You can use a command like @samp{sort -k 1b,1} 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}.
|
||||
|
||||
As a GNU extension, if the input has no unpairable lines the
|
||||
sort order can be any order that considers two fields to be equal if and
|
||||
only if the sort comparison described above considers them to be equal.
|
||||
For example:
|
||||
@@ -4841,6 +4848,8 @@ option---are subject to the specified @var{field-list}.
|
||||
@item -t @var{char}
|
||||
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.
|
||||
|
||||
@item -v @var{file-number}
|
||||
Print a line for each unpairable line in file @var{file-number}
|
||||
|
||||
Reference in new issue
Block a user