1JOIN(1)                          User Commands                         JOIN(1)
2
3
4

NAME

6       join - join lines of two files on a common field
7

SYNOPSIS

9       join [OPTION]... FILE1 FILE2
10

DESCRIPTION

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       --header
52              treat  the  first line in each file as field headers, print them
53              without trying to pair them
54
55       --help display this help and exit
56
57       --version
58              output version information and exit
59
60       Unless -t CHAR  is  given,  leading  blanks  separate  fields  and  are
61       ignored,  else fields are separated by CHAR.  Any FIELD is a field num‐
62       ber counted from 1.  FORMAT is one or more  comma  or  blank  separated
63       specifications, each being `FILENUM.FIELD' or `0'.  Default FORMAT out‐
64       puts the join field, the remaining fields  from  FILE1,  the  remaining
65       fields from FILE2, all separated by CHAR.
66
67       Important:  FILE1  and  FILE2 must be sorted on the join fields.  E.g.,
68       use ` sort -k 1b,1 ' if `join' has no options, or use ` join -t '' ' if
69       `sort'  has no options.  Note, comparisons honor the rules specified by
70       `LC_COLLATE'.  If the input is not sorted  and  some  lines  cannot  be
71       joined, a warning message will be given.
72

AUTHOR

74       Written by Mike Haertel.
75

REPORTING BUGS

77       Report join bugs to bug-coreutils@gnu.org
78       GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
79       General help using GNU software: <http://www.gnu.org/gethelp/>
80       Report join translation bugs to <http://translationproject.org/team/>
81
83       Copyright  ©  2010  Free Software Foundation, Inc.  License GPLv3+: GNU
84       GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
85       This is free software: you are free  to  change  and  redistribute  it.
86       There is NO WARRANTY, to the extent permitted by law.
87

SEE ALSO

89       comm(1), uniq(1)
90
91       The  full documentation for join is maintained as a Texinfo manual.  If
92       the info and join programs are properly installed  at  your  site,  the
93       command
94
95              info coreutils 'join invocation'
96
97       should give you access to the complete manual.
98
99
100
101GNU coreutils 8.5                November 2010                         JOIN(1)
Impressum