title: Read a file using a bash script
body: <p>I need to read a file using a "Do/While" loop.<br>
  How can I read the contents as a string?</p>
  
  <p>Here's my code:</p>
  
  <pre><code>cat directory/scripts/tv2dbarray.txt | while read line
  do
    echo "a line: $line"
  done
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>test.sh: line 4: syntax error near unexpected token `done'
  test.sh: line 4: `done'
  </code></pre>