title: Bash read ignores leading spaces
body: <p>I have file <code>a.txt</code> with following content</p>
  
  <pre><code>    aaa
      bbb
  </code></pre>
  
  <p>When I execute following script:</p>
  
  <pre><code>while read line
  do
      echo $line
  done &lt; a.txt &gt; b.txt
  </code></pre>
  
  <p>generated <code>b.txt</code> contains following</p>
  
  <pre><code>aaa
  bbb
  </code></pre>
  
  <p>It is seen that the leading spaces of lines have got removed. How can I preserve leading spaces?</p>