| 1 |
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1. |
| 2 |
.TH JOIN "1" "February 2026" "GNU coreutils 9.10" "User Commands" |
| 3 |
.SH NAME |
| 4 |
join \- join lines of two files on a common field |
| 5 |
.SH SYNOPSIS |
| 6 |
.B join |
| 7 |
[\fI\,OPTION\/\fR]... \fI\,FILE1 FILE2\/\fR |
| 8 |
.SH DESCRIPTION |
| 9 |
.\" Add any additional description here |
| 10 |
.PP |
| 11 |
For each pair of input lines with identical join fields, write a line to |
| 12 |
standard output. The default join field is the first, delimited by blanks. |
| 13 |
.PP |
| 14 |
When FILE1 or FILE2 (not both) is \-, read standard input. |
| 15 |
.TP |
| 16 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#join-a'\fB\-a FILENUM\fP\X'tty: link' |
| 17 |
also print unpairable lines from file FILENUM, |
| 18 |
where FILENUM is 1 or 2, corresponding to FILE1 or FILE2 |
| 19 |
.TP |
| 20 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#join-e'\fB\-e STRING\fP\X'tty: link' |
| 21 |
replace missing (empty) input fields with STRING; |
| 22 |
I.e., missing fields specified with '\-12jo' options |
| 23 |
.TP |
| 24 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#join-i'\fB\-i, \-\-ignore\-case\fP\X'tty: link' |
| 25 |
ignore differences in case when comparing fields |
| 26 |
.TP |
| 27 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#join-j'\fB\-j FIELD\fP\X'tty: link' |
| 28 |
equivalent to '\-1 FIELD \fB\-2\fR FIELD' |
| 29 |
.TP |
| 30 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#join-o'\fB\-o FORMAT\fP\X'tty: link' |
| 31 |
obey FORMAT while constructing output line |
| 32 |
.TP |
| 33 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#join-t'\fB\-t CHAR\fP\X'tty: link' |
| 34 |
use CHAR as input and output field separator |
| 35 |
.TP |
| 36 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#join-v'\fB\-v FILENUM\fP\X'tty: link' |
| 37 |
like \fB\-a\fR FILENUM, but suppress joined output lines |
| 38 |
.TP |
| 39 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#join-1'\fB\-1 FIELD\fP\X'tty: link' |
| 40 |
join on this FIELD of file 1 |
| 41 |
.TP |
| 42 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#join-2'\fB\-2 FIELD\fP\X'tty: link' |
| 43 |
join on this FIELD of file 2 |
| 44 |
.TP |
| 45 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#join--check-order'\fB\-\-check\-order\fP\X'tty: link' |
| 46 |
check that the input is correctly sorted, even |
| 47 |
if all input lines are pairable |
| 48 |
.TP |
| 49 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#join--nocheck-order'\fB\-\-nocheck\-order\fP\X'tty: link' |
| 50 |
do not check that the input is correctly sorted |
| 51 |
.TP |
| 52 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#join--header'\fB\-\-header\fP\X'tty: link' |
| 53 |
treat the first line in each file as field headers, |
| 54 |
print them without trying to pair them |
| 55 |
.TP |
| 56 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#join-z'\fB\-z, \-\-zero\-terminated\fP\X'tty: link' |
| 57 |
line delimiter is NUL, not newline |
| 58 |
.TP |
| 59 |
\X'tty: link https://www.gnu.org/software/coreutils/join#join--help'\fB\-\-help\fP\X'tty: link' |
| 60 |
display this help and exit |
| 61 |
.TP |
| 62 |
\X'tty: link https://www.gnu.org/software/coreutils/join#join--version'\fB\-\-version\fP\X'tty: link' |
| 63 |
output version information and exit |
| 64 |
.PP |
| 65 |
Unless \fB\-t\fR CHAR is given, leading blanks separate fields and are ignored, |
| 66 |
else fields are separated by CHAR. Any FIELD is a field number counted |
| 67 |
from 1. FORMAT is one or more comma or blank separated specifications, |
| 68 |
each being 'FILENUM.FIELD' or '0'. Default FORMAT outputs the join field, |
| 69 |
the remaining fields from FILE1, the remaining fields from FILE2, all |
| 70 |
separated by CHAR. If FORMAT is the keyword 'auto', then the first |
| 71 |
line of each file determines the number of fields output for each line. |
| 72 |
.PP |
| 73 |
Important: FILE1 and FILE2 must be sorted on the join fields. |
| 74 |
E.g., use "sort \fB\-k\fR 1b,1" if 'join' has no options, |
| 75 |
or use "join \fB\-t\fR ''" if 'sort' has no options. |
| 76 |
Comparisons honor the rules specified by 'LC_COLLATE'. |
| 77 |
If the input is not sorted and some lines cannot be joined, a |
| 78 |
warning message will be given. |
| 79 |
.SH AUTHOR |
| 80 |
Written by Mike Haertel. |
| 81 |
.SH "REPORTING BUGS" |
| 82 |
Report bugs to: bug\[email protected] |
| 83 |
.br |
| 84 |
GNU coreutils home page: <https://www.gnu.org/software/coreutils/> |
| 85 |
.br |
| 86 |
General help using GNU software: <https://www.gnu.org/gethelp/> |
| 87 |
.br |
| 88 |
Report any translation bugs to <https://translationproject.org/team/> |
| 89 |
.SH "SEE ALSO" |
| 90 |
\fBcomm\fP(1), \fBuniq\fP(1) |
| 91 |
.PP |
| 92 |
.br |
| 93 |
Full documentation <https://www.gnu.org/software/coreutils/join> |
| 94 |
.br |
| 95 |
or available locally via: info \(aq(coreutils) join invocation\(aq |
| 96 |
.PP |
| 97 |
.br |
| 98 |
Packaged by Debian (9.10\-1) |
| 99 |
.br |
| 100 |
Copyright \(co 2026 Free Software Foundation, Inc. |
| 101 |
.br |
| 102 |
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. |
| 103 |
.br |
| 104 |
This is free software: you are free to change and redistribute it. |
| 105 |
.br |
| 106 |
There is NO WARRANTY, to the extent permitted by law. |