title: What are NR and FNR and what does "NR==FNR" imply?
body: <p>I am learning file comparison using <code>awk</code>.</p>
  
  <p>I found syntax like below,</p>
  
  <pre><code>awk 'NR==FNR{a[$1];next}$1 in a{print $1}' file1 file2
  </code></pre>
  
  <p>I couldn't understand what is the significance of <code>NR==FNR</code> in this?
  If I try with <code>FNR==NR</code> then also I get the same output? </p>
  
  <p>What exactly does it do?</p>