summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-02-21 02:55:10 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-02-21 02:55:10 +0000
commit5bc9231e760e6e56991bf1edca0352dd9bc7ea81 (patch)
tree8df2a5571d1eb31c8f9ae9f69f3ab9ed5bc1c4ff /doc
parent33637fa804f660fc6a8042761b1d01a957f9714a (diff)
downloadcoreutils-5bc9231e760e6e56991bf1edca0352dd9bc7ea81.tar.xz
(join invocation): Mention `sort -k 1b,1'.
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi13
1 files changed, 11 insertions, 2 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index c05308165..ddf4f3daa 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -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}