title: Read line by line from parameter file in function
body: <p>I have a function with a parameter file. And I want to read it line by line.</p>
  
  <p><strong>Condition</strong></p>
  
  <p>If the lines are between <code>&lt;?bash</code> and <code>?&gt;</code> then I do <code>bash -c '$line'</code> else I display the line. </p>
  
  <p><strong>Here my file (file):</strong></p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;Hello
  &lt;?bash
  echo "world !"
  ?&gt;
  &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p><strong>Here my Bash script (bashtml):</strong> </p>
  
  <pre><code>#!/bin/bash
  
  function generation()
  {
    while read line
    do
      if [ $line = '&lt;?bash' ]
      then
        while [ $line != '?&gt;' ]
        do
         bash -c '$line'
        done
      else
       echo $line
      fi
    done
  }
  
  generation $file
  </code></pre>
  
  <p>I execute this script: </p>
  
  <pre><code>./bashhtml
  </code></pre>
  
  <p>I am novice in Bash script and I'm lost</p>