title: How to replace a multi line string in a bunch files
body: <pre><code>#!/bin/sh
  old="hello"
  new="world"
  sed -i s/"${old}"/"${new}"/g $(grep "${old}" -rl *)
  </code></pre>
  
  <p>The preceding script just work for single line text, how can I write a script can replace
  a multi line text.</p>
  
  <pre><code>old='line1
  line2
  line3'
  
  new='newtext1
  newtext2'
  </code></pre>
  
  <p>What command can I use.</p>