jjooiinn -- Command

Join two data bases
jjooiinn [-aa [_n] ] [-ee _s_t_r_i_n_g ] [-jj[_n] _k_e_y_f] [-oo _n._m ...] [-tt_c] _f_i_l_e_1 _f_i_l_e_2

jjooiinn processes  the text files  _f_i_l_e_1 and _f_i_l_e_2,  each of which  contains a
relational data  base.  If either file  name is `-', the  standard input is
used for that file.

For the purposes  of jjooiinn, a data base file  contains a set of records, one
per input  line.  Each  record contains  a number of  _f_i_e_l_d_s. One  field is
differentiated as _k_e_y field for each file.  Each file must be sorted by key
field, for example with ssoorrtt.

By default, the key field is the first field in each record.  The -jj option
changes the  key field number  to _k_e_y_f for  the desired file.   In this and
other options below, the optional file number _n must be 11 to indicate _f_i_l_e_1
or 22 to indicate _f_i_l_e_2. If no _n is given, both _f_i_l_e_1 and _f_i_l_e_2 are assumed.

Normally,  fields are  separated by  any amount of  white space  (blanks or
tabs).  Leading blanks or tabs are not considered part of the fields.  With
the -tt  option, the separator character is _c.  With this option zero-length
fields are  possible; every occurrence  of the separator  ends the previous
field and starts a new one.

Output consists  only of  records for  which the key  field occurs  in both
files.  As  a consequence of the  sorted order of the  input, the output is
also sorted by the key field.   Each output record has first the key field,
then each  field from  the _f_i_l_e_1  record but the  key field, and  then each
field from the _f_i_l_e_2 record but the key field.  Fields are separated in the
output with the specified field character,  or with a space character if no
-tt option was given.  Output  records are always terminated with a newline.
Under the -ee option, _s_t_r_i_n_g is printed for each empty field.

The -aa  option enables printing  of records found  in only file _n.  If _n is
missing, unpaired  records are  printed from  both input files.   To output
only certain  fields, the -oo  option precedes a  list of desired  fields to
print.  Each element is of the form _n._m where _n is the file number and _m is
the field number.

For example,

    join -t: -j1 3 -o 1.3 2.4 1.4 1.1 2.2 filea fileb

joins  ffiilleeaa and  ffiilleebb  which have  fields  separated by  the colon  (`:')
character.  The  join field number  is 3 for  ffiilleeaa and 1  (by default) for
ffiilleebb. The selected five fields are produced in the output.

_S_e_e _A_l_s_o
aawwkk, ccoommmm, ccoommmmaannddss, ssoorrtt, uunniiqq
