title: how to join to files with awk/sed/grep/bash similar to SQL JOIN
body: <p><strong>how to join to files with awk/sed/grep/bash similar to SQL JOIN?</strong></p>
  
  <p>I have a file that looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/s83g5.png" alt="enter image description here"></p>
  
  <p>and another one that looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/9G0q5.png" alt="enter image description here"></p>
  
  <p>i've also a text version of the image above:</p>
  
  <pre><code>+----------+------------------+------+------------+----+---------------------------------------------------+---------------------------------------------------+-----+-----+-----+------+-------+-------+--------------+------------+--+--+---+---+----+--+---+---+----+------------+------------+------------+------------+
  | 21548598 | DSND001906102.2  | 0107 |  001906102 | 02 | FROZEN / O.S.T.                                   | FROZEN / O.S.T.                                   | 001 | 024 |     |      | 11.49 | 13.95 | 050087295745 | 11/25/2013 |  |  | N | N | 30 |  | 1 | E |  1 | 10/07/2013 | 02/27/2014 | 10/07/2013 | 10/07/2013 |
  | 25584998 | WD1194190DVD     | 0819 |    1194190 | 18 | FROZEN / (WS DOL DTS)                             | FROZEN / (WS DOL DTS)                             | 050 | 110 |     | G    | 21.25 | 29.99 | 786936838961 | 03/18/2014 |  |  | N | N |  0 |  | 1 | A |  2 | 12/20/2013 | 03/13/2014 | 12/20/2013 | 12/20/2013 |
  | 25812794 | WHV1000292717BR  | 0526 | 1000292717 | BR | GRAVITY / (UVDC)                                  | GRAVITY / (UVDC)                                  | 050 | 093 |     | PG13 | 29.49 | 35.99 | 883929244577 | 02/25/2014 |  |  | N | N | 30 |  | 1 | E |  3 | 01/16/2014 | 02/11/2014 | 01/16/2014 | 01/16/2014 |
  | 24475594 | SNY303251.2      | 0085 |     303251 | 02 | BEYONCE                                           | BEYONCE                                           | 001 | 004 |     |      | 14.99 | 17.97 | 888430325128 | 12/20/2013 |  |  | N | N | 30 |  | 1 | A |  4 | 12/19/2013 | 01/02/2014 | 12/19/2013 | 12/19/2013 |
  | 25812787 | WHV1000284958DVD | 0526 | 1000284958 | 18 | GRAVITY (2PC) / (UVDC SPEC 2PK)                   | GRAVITY (2PC) / (UVDC SPEC 2PK)                   | 050 | 093 |     | PG13 | 21.25 | 28.98 | 883929242528 | 02/25/2014 |  |  | N | N | 30 |  | 1 | E |  5 | 01/16/2014 | 02/11/2014 | 01/16/2014 | 01/16/2014 |
  | 21425462 | PBSDMST64400DVD  | E349 |      64400 | 18 | MASTERPIECE CLASSIC: DOWNTON ABBEY SEASON 4 (3PC) | MASTERPIECE CLASSIC: DOWNTON ABBEY SEASON 4 (3PC) | 050 | 095 | 094 |      | 30.49 | 49.99 | 841887019705 | 01/28/2014 |  |  | N | N | 30 |  | 1 | A |  6 | 09/06/2013 | 01/15/2014 | 09/06/2013 | 09/06/2013 |
  | 25584974 | WD1194170BR      | 0819 |    1194170 | BR | FROZEN (2PC) (W/DVD) / (WS AC3 DTS 2PK DIGC)      | FROZEN (2PC) (W/DVD) / (WS AC3 DTS 2PK DIGC)      | 050 | 110 |     | G    | 27.75 | 39.99 | 786936838923 | 03/18/2014 |  |  | N | N |  0 |  | 2 | A |  7 | 12/20/2013 | 03/13/2014 | 01/15/2014 | 01/15/2014 |
  | 21388262 | HBO1000394029DVD | 0203 | 1000394029 | 18 | GAME OF THRONES: SEASON 3                         | GAME OF THRONES: SEASON 3                         | 050 | 095 | 093 |      | 47.99 | 59.98 | 883929330713 | 02/18/2014 |  |  | N | N | 30 |  | 1 | E |  8 | 08/29/2013 | 02/28/2014 | 08/29/2013 | 08/29/2013 |
  | 25688450 | WD11955700DVD    | 0819 |   11955700 | 18 | THOR: THE DARK WORLD / (AC3 DOL)                  | THOR: THE DARK WORLD / (AC3 DOL)                  | 050 | 093 |     | PG13 | 21.25 | 29.99 | 786936839500 | 02/25/2014 |  |  | N | N | 30 |  | 1 | A |  9 | 12/24/2013 | 02/20/2014 | 12/24/2013 | 12/24/2013 |
  | 23061316 | PRT359054DVD     | 0818 |     359054 | 18 | JACKASS PRESENTS: BAD GRANDPA / (WS DUB SUB AC3)  | JACKASS PRESENTS: BAD GRANDPA / (WS DUB SUB AC3)  | 050 | 110 |     | R    | 21.75 | 29.98 | 097363590545 | 01/28/2014 |  |  | N | N | 30 |  | 1 | E | 10 | 12/06/2013 | 03/12/2014 | 12/06/2013 | 12/06/2013 |
  | 21548611 | DSND001942202.2  | 0107 |  001942202 | 02 | FROZEN / O.S.T. (BONUS CD) (DLX)                  | FROZEN / O.S.T. (BONUS CD) (DLX)                  | 001 | 024 |     |      | 14.09 | 19.99 | 050087299439 | 11/25/2013 |  |  | N | N | 30 |  | 1 | E | 11 | 10/07/2013 | 02/06/2014 | 10/07/2013 | 10/07/2013 |
  +----------+------------------+------+------------+----+---------------------------------------------------+---------------------------------------------------+-----+-----+-----+------+-------+-------+--------------+------------+--+--+---+---+----+--+---+---+----+------------+------------+------------+------------+
  </code></pre>
  
  <p>The 2nd column from the first file can be joined to the 14th column of the second file!</p>
  
  <p>here's what i've been trying to do:</p>
  
  <pre><code>join &lt;(sort awk -F"\t" '{print $14,$12}' aecprda12.tab) &lt;(sort awk -F"\t" '{print $2,$1}' output1.csv)
  </code></pre>
  
  <p>but i am getting these errors:</p>
  
  <pre><code>$ join &lt;(sort awk -F"\t" '{print $14,$12}' aecprda12.tab) &lt;(sort awk -F"\t" '{print $2,$1}' output1.csv) 
  sort: unknown option -- F 
  Try sort --help' for more information. 
  sort: unknown option -- F 
  Try sort --help' for more information. 
  -700476409 [waitproc] -bash 10336 sig_send: error sending signal 20 to pid 10336, pipe handle 0x84, Win32 error 109
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/OXnpn.png" alt="enter image description here"></p>
  
  <p>the output i would like would be something like this:</p>
  
  <pre><code>+-------+-------+---------------+
  | 12.99 | 14.77 | 3383510002151 |
  | 13.97 | 17.96 | 3383510002175 |
  | 13.2  | 13    | 3383510002267 |
  | 13.74 | 14.19 | 3399240165349 |
  | 9.43  | 9.52  | 3399240165363 |
  | 12.99 | 4.97  | 3399240165479 |
  | 7.16  | 7.48  | 3399240165677 |
  | 11.24 | 9.43  | 4011550620286 |
  | 13.86 | 13.43 | 4260182980316 |
  | 13.98 | 12.99 | 4260182980507 |
  | 10.97 | 13.97 | 4260182980514 |
  | 11.96 | 13.2  | 4260182980545 |
  | 15.88 | 13.74 | 4260182980552 |
  +-------+-------+---------------+
  </code></pre>
  
  <p>what am i doing wrong?</p>