title: How can I insert multiple lines below a given line in sed with the line containing slashes
body: <p>I'm trying to insert the following lines below a line in my file:</p>
  
  <pre><code>&lt;Test&gt;
    &lt;Document&gt;
      ThisIsATest
    &lt;Document&gt;
  &lt;/Test&gt;
  </code></pre>
  
  <p>The line I want to insert these below is <code>This is a test.</code></p>
  
  <p>I can insert regular text just fine under it with the command <code>sed -i '/test/aThis is new text' test2.txt</code>, and the file will contain:</p>
  
  <pre><code>This is a test
  This is new text
  </code></pre>
  
  <p>The difficult part is that I can't seem to do it with a multi-line item with slashes. Any ideas on how to do this? I don't have to use sed or awk; any other Linux utility would be fine as well. </p>