1JOIN(1) User Commands JOIN(1)
2
3
4
6 join - join lines of two files on a common field
7
9 join [OPTION]... FILE1 FILE2
10
12 For each pair of input lines with identical join fields, write a line
13 to standard output. The default join field is the first, delimited by
14 whitespace. When FILE1 or FILE2 (not both) is -, read standard input.
15
16 -a FILENUM
17 print unpairable lines coming from file FILENUM, where FILENUM
18 is 1 or 2, corresponding to FILE1 or FILE2
19
20 -e EMPTY
21 replace missing input fields with EMPTY
22
23 -i, --ignore-case
24 ignore differences in case when comparing fields
25
26 -j FIELD
27 equivalent to `-1 FIELD -2 FIELD'
28
29 -o FORMAT
30 obey FORMAT while constructing output line
31
32 -t CHAR
33 use CHAR as input and output field separator
34
35 -v FILENUM
36 like -a FILENUM, but suppress joined output lines
37
38 -1 FIELD
39 join on this FIELD of file 1
40
41 -2 FIELD
42 join on this FIELD of file 2
43
44 --check-order
45 check that the input is correctly sorted, even if all input
46 lines are pairable
47
48 --nocheck-order
49 do not check that the input is correctly sorted
50
51 --help display this help and exit
52
53 --version
54 output version information and exit
55
56 Unless -t CHAR is given, leading blanks separate fields and are
57 ignored, else fields are separated by CHAR. Any FIELD is a field num‐
58 ber counted from 1. FORMAT is one or more comma or blank separated
59 specifications, each being `FILENUM.FIELD' or `0'. Default FORMAT out‐
60 puts the join field, the remaining fields from FILE1, the remaining
61 fields from FILE2, all separated by CHAR.
62
63 Important: FILE1 and FILE2 must be sorted on the join fields. E.g.,
64 use `sort -k 1b,1' if `join' has no options. Note, comparisons honor
65 the rules specified by `LC_COLLATE'. If the input is not sorted and
66 some lines cannot be joined, a warning message will be given.
67
69 Written by Mike Haertel.
70
72 Report join bugs to bug-coreutils@gnu.org
73 GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
74 General help using GNU software: <http://www.gnu.org/gethelp/>
75 Report join translation bugs to <http://translationproject.org/team/>
76
78 Copyright © 2010 Free Software Foundation, Inc. License GPLv3+: GNU
79 GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
80 This is free software: you are free to change and redistribute it.
81 There is NO WARRANTY, to the extent permitted by law.
82
84 comm(1), uniq(1)
85
86 The full documentation for join is maintained as a Texinfo manual. If
87 the info and join programs are properly installed at your site, the
88 command
89
90 info coreutils 'join invocation'
91
92 should give you access to the complete manual.
93
94
95
96GNU coreutils 8.4 June 2018 JOIN(1)