title: Replace a word with multiple lines using sed?
body: <p>I'm working on a bash-script that has to prepare an E-Mail for being sent to a user.</p>
  
  <p>It aggregates some data, which ends up being multiple lines of stuff. For the example stored in <code>$DATA</code>.</p>
  
  <p>Now, after a bit of stfw I found a few things like <code>sed -ei "s/_data_/${DATA}/g" mail.tpl</code> and also <a href="https://stackoverflow.com/questions/6684487/sed-replace-with-variable-with-multiple-lines">sed replace with variable with multiple lines</a>. None of them work.</p>
  
  <p>Now the question is, how do I get <code>sed</code> to replace something with multiple lines of text?</p>
  
  <p>(Alternatives to <code>sed</code> are also welcome!)</p>