title: Is there a difference between awk 'NR%2==1', awk 'FNR%2', and sed 'n;d'?
body: <p>I'm currently preparing for a big contest. Is there a difference between the following three commands? The exercice asks to us to print every other line of a command <code>ls -l</code>, starting from the first line.</p>
  <p>The first command:</p>
  <pre><code>ls -l | awk 'NR%2==1'
  </code></pre>
  <p>The second:</p>
  <pre><code>ls -l | awk 'FNR%2'
  </code></pre>
  <p>The third:</p>
  <pre><code>ls -l | sed 'n;d'
  </code></pre>
  <p>I wrote the third one. The first two, I'm not sure I understand what they do.</p>