title: sed replace with variable with multiple lines
body: <p>I am trying to replace a word with a text which spans multiple lines. I know that I can simply use the newline character \n to solve this problem, but I want to keep the string "clean" of any unwanted formatting. </p>
  
  <p>The below example obviously does not work:</p>
  
  <pre><code>read -r -d '' TEST &lt;&lt;EOI
  a
  b
  c
  EOI
  
  sed -e "s/TOREPLACE/${TEST}/" file.txt
  </code></pre>
  
  <p>Any ideas of how to achieve this WITHOUT modifying the part which starts with read and ends with EOI?</p>