title: Compare Two Files with duplicate input value
body: <p>I am having the following two files</p>
  
  <h1>BC.txt</h1>
  
  <pre><code>"PB.50262.10"; UMI=AGCGGCCT; BC=TTTCAGCGCCGA;
  "PB.50262.10"; UMI=AAGCGGCC; BC=TTTCAGCGCCGA;
  </code></pre>
  
  <h1>PB.txt</h1>
  
  <pre><code>c4  PB  tr  41258945    41270445    .   +   .   g_i "PB.50262"; t_i "PB.50262.10";
  c4  PB  Ex  41258945    41259026    .   +   .   g_i "PB.50262"; t_i "PB.50262.10";
  c4  PB  Ex  41259626    41259754    .   +   .   g_i "PB.50262"; t_i "PB.50262.10";
  c4  PB  Ex  41262664    41262814    .   +   .   g_i "PB.50262"; t_i "PB.50262.10";
  </code></pre>
  
  <p>I am trying to compare Col1 of BC.txt with Col12 of PB.txt and print the matches next to each other. For same value in col1 of BC.txt has different value in col2 and Col3. So while comparing I am getting output for only one entry of BC.txt. But I want for all.  </p>
  
  <pre><code>    awk 'BEGIN {OFS=FS} NR==FNR {a[$1]=($2" "$3);next} $12 in a {print $0,a[$12]}' BC.txt PB.txt
  </code></pre>
  
  <h1>Expected Output</h1>
  
  <pre><code>c4  PB  tr  41258945    41270445    .   +   .   g_i "PB.50262"; t_i "PB.50262.10"; UMI=AGCGGCCT; BC=TTTCAGCGCCGA;
  c4  PB  Ex  41258945    41259026    .   +   .   g_i "PB.50262"; t_i "PB.50262.10"; UMI=AGCGGCCT; BC=TTTCAGCGCCGA;
  c4  PB  Ex  41259626    41259754    .   +   .   g_i "PB.50262"; t_i "PB.50262.10"; UMI=AGCGGCCT; BC=TTTCAGCGCCGA;
  c4  PB  Ex  41262664    41262814    .   +   .   g_i "PB.50262"; t_i "PB.50262.10"; UMI=AGCGGCCT; BC=TTTCAGCGCCGA;
  c4  PB  tr  41258945    41270445    .   +   .   g_i "PB.50262"; t_i "PB.50262.10"; UMI=AAGCGGCC; BC=TTTCAGCGCCGA;
  c4  PB  Ex  41258945    41259026    .   +   .   g_i "PB.50262"; t_i "PB.50262.10"; UMI=AAGCGGCC; BC=TTTCAGCGCCGA;
  c4  PB  Ex  41259626    41259754    .   +   .   g_i "PB.50262"; t_i "PB.50262.10"; UMI=AAGCGGCC; BC=TTTCAGCGCCGA;
  c4  PB  Ex  41262664    41262814    .   +   .   g_i "PB.50262"; t_i "PB.50262.10"; UMI=AAGCGGCC; BC=TTTCAGCGCCGA;
  </code></pre>
  
  <p>I want to compare all the entries of BC.txt with that of PB.txt; but since its the same value my code is not working.</p>