title: bash: iterating through txt file lines can't read last line
body: <p><code>while read p; do</code><br>
    <code>echo $p</code><br>
    <code>done &lt; file.txt</code></p>
  
  <p>this code can read all lines in the file.txt except the last line any ideas why. 
  Thanks</p>