title: reading a file using shell script
body: <p>I have a text file named <code>sqlfile</code>, with the following content:</p>
  
  <pre><code>a.sql
  b.sql
  c.sql
  d.sql
  </code></pre>
  
  <p>What I want is that to store them in variables and then print using <code>for</code> loop.
  But here I get only <code>d.sql</code> in the output of the script.</p>
  
  <p>The script:</p>
  
  <pre><code>#!/bin/bash
  
  while read line
  do
  files=`echo $line`
  done &lt; /home/abdul_old/Desktop/My_Shell_Script/sqlfile
  
  for file in $files
          do
                  echo $file
          done
  </code></pre>