title: Reading files line by line in by using for loop bash script
body: <p>Say for example I have a file called "tests",it contains</p>
  
  <pre><code>a
  b
  c
  d
  </code></pre>
  
  <p>I'm trying to read this file line by line and it should output</p>
  
  <pre><code>a
  b
  c
  d
  </code></pre>
  
  <p>I create a bash script called "read" and try to read this file by using for loop</p>
  
  <pre><code>#!/bin/bash
  for i in ${1}; do //for the ith line of the first argument, do...
     echo $i  // prints ith line
  done
  </code></pre>
  
  <p>I execute it</p>
  
  <pre><code>./read tests
  </code></pre>
  
  <p>but it gives me</p>
  
  <pre><code>tests
  </code></pre>
  
  <p>Does anyone know what happened? Why does it print "tests" instead of the content of the "tests"? Thanks in advance. </p>