title: Is there any difference in bash between "while read -r line; do ...; done < file` and `cat file | while IFS= read -r line; do ...; done`?
body: <p>I'm learning bash and I found a tutorial on internet that says these are the same:</p>
  
  <pre><code>while read -r line;
  do
      ...
  done &lt; file
  
  $ cat file | while IFS= read -r line;
  do
      ...
  done
  </code></pre>
  
  <p>Are there any subtle differences in these two loops are are they really the same?</p>