title: Bash/Shell replace a chunk of text from line x to line y both lines included with contents of another file
body: <p>Lets say I in file A have this content</p>
  
  <pre><code>1 &lt;div class="a"&gt;&lt;/div&gt;
  2 &lt;div class="b"&gt;&lt;/div&gt;
  3 &lt;div class="c"&gt;&lt;/div&gt;
  4 &lt;div....
  5 ...
  6 ...
  7 ...
  8 ...
  9 &lt;div class="i"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I included line numbers which are not really there</p>
  
  <p>And I have two variables in my script called <code>start_line</code> and <code>end_line</code>
  These contains the line where I wish to start my replacing and the line where I wish to end my replacing</p>
  
  <p>I then have a file B which is also a variable called export which contains some text that is also HTML tags (EDIT: thought of this as being irrelevant - but it is not it seems)</p>
  
  <p>HOW do I go about replacing all in file A from line 4 to 7 when I know these numbers as variables and want to replace them with the contents of a file which is also a variable (can either be the file location or a cat variable of same I guess)</p>
  
  <p>Been messing around with sed and the range thing -n but yeah... and also some awk - but total n00b in shell and bash here</p>
  
  <p>I have so far tried (variable names are not same, but sould make sense I hope</p>
  
  <pre><code>sed "-n${start_line},${end_line} s/${stump_text}" "$export_file"
  </code></pre>
  
  <p>EDITED: My bad I did not inform the actual text being replaced is HTML</p>