title: Read line by line in Bash script
body: <p>I want to do the following: Read a file line by line and use the line as a parameter.</p>
  <pre><code>FILE=&quot;cat test&quot;
  echo &quot;$FILE&quot; | \
  while read CMD; do
  echo $CMD
  done
  </code></pre>
  <p>But when I do <code>echo $CMD</code>, it just prints <code>cat test</code>.</p>