title: Replace multiple lines of file in Shell with variable
body: <p>I have a txt file with: </p>
  
  <pre><code>A
  B
  &lt;anything&gt;
  C
  D
  </code></pre>
  
  <p>I want to replace from B to C in the file with a string, but this is not matching:</p>
  
  <pre><code>sed -i -e "s/B.*C/replace/g" $fileName
  </code></pre>
  
  <p>I have found how to target the multi-line string with:</p>
  
  <pre><code>awk '/B/,/C/' $fileName
  </code></pre>