1JOIN(1)                     General Commands Manual                    JOIN(1)
2
3
4

NAME

6       join - relational database operator
7

SYNOPSIS

9       join [ options ] file1 file2
10

DESCRIPTION

12       Join  forms, on the standard output, a join of the two relations speci‐
13       fied by the lines of file1 and file2.  If file1 is  `-',  the  standard
14       input is used.
15
16       File1  and  file2 must be sorted in increasing ASCII collating sequence
17       on the fields on which they are to be joined,  normally  the  first  in
18       each line.
19
20       There  is  one  line  in the output for each pair of lines in file1 and
21       file2 that have identical join fields.  The output line  normally  con‐
22       sists  of  the common field, then the rest of the line from file1, then
23       the rest of the line from file2.
24
25       Fields are normally separated by blank, tab or newline.  In this  case,
26       multiple separators count as one, and leading separators are discarded.
27
28       These options are recognized:
29
30       -an    In  addition  to  the  normal  output,  produce  a line for each
31              unpairable line in file n, where n is 1 or 2.
32
33       -e s   Replace empty output fields by string s.
34
35       -jn m  Join on the mth field of file n.  If n is missing, use  the  mth
36              field in each file.
37
38       -o list
39              Each  output  line  comprises the fields specified in list, each
40              element of which has the form n.m, where n is a file number  and
41              m is a field number.
42
43       -tc    Use  character  c as a separator (tab character).  Every appear‐
44              ance of c in a line is significant.
45

SEE ALSO

47       sort(1), comm(1), awk(1)
48

BUGS

50       With default field  separation,  the  collating  sequence  is  that  of
51       sort -b; with -t, the sequence is that of a plain sort.
52
53       The  conventions  of join, sort, comm, uniq, look and awk(1) are wildly
54       incongruous.
55
56
57
587th Edition                     April 29, 1985                         JOIN(1)
Impressum