title: Read file line by line and perform action for each in bash
body: <p>I have a text file, it contains a single word on each line.</p>
  
  <p>I need a loop in bash to read each line, then perform a command each time it reads a line, using the input from that line as part of the command.</p>
  
  <p>I am just not sure of the proper syntax to do this in bash.  If anyone can help, it would be great.  I need to use the line from the test file obtained as a paramter to call another function.  The loop should stop when there are no more lines in the text file. </p>
  
  <p>Psuedo code: </p>
  
  <pre><code>Read testfile.txt.
  For each in testfile.txt
  {
  some_function linefromtestfile
  }
  </code></pre>