title: Reading file using shell script, format of the line has changed
body: <p>I am reading a file using the following code:</p>
  
  <pre><code>displayLine(){
      echo $line
  }
  
  filename="SampleFile"
  while read line
  do
      displayLine $line
  done &lt; "$filename"
  </code></pre>
  
  <p>The format of the file that I am getting after using the script is this:</p>
  
  <pre><code>ID EVENT OK NOK
  101 ABC1123 ok nok
  101 ABC1223 ok      
  101 ABC1323 ok nok
  101 ABC1423 ok nok
  </code></pre>
  
  <p>But the actual format of the file is like this:</p>
  
  <pre><code>ID  EVENT       OK      NOK
  101 ABC1123     ok      nok
  101 ABC1223     ok      
  101 ABC1323     ok      nok
  101 ABC1423     ok      nok
  </code></pre>
  
  <p>My script is somehow trimming the extra spaces between the words. However, I want the actual format of the file.</p>
  
  <p>Could anyone tell me how to achieve that?</p>
  
  <p>Thanks!!</p>