[0m


JOIN(1)             UNIX Programmer's Manual		  JOIN(1)



[1mNAME
     [0mjoin - relational database operator

[1mSYNOPSIS
     join [0m[ options ] file1 file2

[1mDESCRIPTION
     [0m_J_o_i_n forms, on the standard output, a join of the two rela-
     tions specified by the lines of _f_i_l_e_1 and _f_i_l_e_2.  If _f_i_l_e_1
     is `-', the standard input is used.

     _F_i_l_e_1 and _f_i_l_e_2 must be sorted in increasing ASCII collating
     sequence on the fields on which they are to be joined, nor-
     mally the first in each line.

     There is one line in the output for each pair of lines in
     _f_i_l_e_1 and _f_i_l_e_2 that have identical join fields.  The output
     line normally consists of the common field, then the rest of
     the line from _f_i_l_e_1, then the rest of the line from _f_i_l_e_2.

     Fields are normally separated by blank, tab or newline.  In
     this case, multiple separators count as one, and leading
     separators are discarded.

     These options are recognized:

     [1m-a[0m_n  In addition to the normal output, produce a line for
	  each unpairable line in file _n, where _n is 1 or 2.

     [1m-e [0m_s Replace empty output fields by string _s.

     [1m-j[0m_n _m
	  Join on the _mth field of file _n.  If _n is missing, use
	  the _mth field in each file.

     [1m-o [0m_l_i_s_t
	  Each output line comprises the fields specified in
	  _l_i_s_t, each element of which has the form _n._m, where _n
	  is a file number and _m is a field number.

     [1m-t[0m_c  Use character _c as a separator (tab character).  Every
	  appearance of _c in a line is significant.

[1mSEE ALSO
     [0msort(1), comm(1), awk(1)

[1mBUGS
     [0mWith default field separation, the collating sequence is
     that of _s_o_r_t -_b; with [1m-t[0m, the sequence is that of a plain
     sort.





Printed 15/1/92     Revision 1.2 of 19/10/88			1






JOIN(1)             UNIX Programmer's Manual		  JOIN(1)



     The conventions of _j_o_i_n, _s_o_r_t, _c_o_m_m, _u_n_i_q, _l_o_o_k and _a_w_k(1)
     are wildly incongruous.





















































Printed 15/1/92     Revision 1.2 of 19/10/88			2



[0m