title: awk to remove lines if column not in another file
body: <p>In the below <code>awk</code> I am trying to remove those lines in <code>f2</code> <code>$1</code> that do not match <code>f1</code> <code>$1</code>. The <code>awk</code> does execute but it prints all the lines not the desired output. Thank you :).</p>
  <p><strong>awk</strong></p>
  <pre><code> awk 'FNR==NR{map[$1]=1;next;}map[$1]==$1{print;}' f1 f2
  </code></pre>
  <p><strong>f1</strong></p>
  <pre><code>ACTA2
  ADA
  AIP
  </code></pre>
  <p><strong>f2</strong></p>
  <pre><code>ADA
  AG11
  AIP
  </code></pre>
  <p><strong>desired</strong></p>
  <pre><code>ADA
  AIP
  </code></pre>