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