title: awk compare columns from two files, impute values of another column
body: <p>I want to compare the second columns from two files. If there is a match, print the corresponding value of the third column from the second file to the first file. If no match is found, fill with "NA"</p>
  
  <pre><code>File 1
  
  1      rs1    AA    10
  1      rs2    DD    20
  1      rs3    EE    30
  1      rs4    RR    40
  
  
  File 2
  
  1      rs1    Pascal
  1      rs4    Albinoni
  
  
  Desired output
  
  1      rs1    AA    10    Pascal
  1      rs2    DD    20    NA
  1      rs3    EE    30    NA
  1      rs4    RR    40    Albinoni
  </code></pre>
  
  <p>I have used this code, but it only output the matches:</p>
  
  <pre><code>awk 'NR==FNR { a[$1]=$2; next} $1 in a {print $0, a[$1]}' File2 File1
  </code></pre>
  
  <p>Thank you </p>