title: How do I use for to loop over potentially-empty lines of output from egrep?
body: <p>I'm trying to print out blank lines in a text file but I want it to also print out numbers to see how many lines of white spaces the egrep returned by using:</p>
  <pre><code>for x in $(egrep '$^ txtfile); do echo '$x'; done
  </code></pre>
  <p>but this doesn't echo or return anything, is there any way I know how many blank lines the egrep command returned?</p>