title: Insert contents of a file after specific pattern match
body: <p>I want to insert file content at specific pattern match. The following is an example: add <code>file2.txt</code> content in <code>file1.txt</code> between <code>&lt;tag&gt;</code> and <code>&lt;/tag&gt;</code>.</p>
  
  <p><strong><em><code>file1.txt</code></em></strong></p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;tag&gt;
  &lt;/tag&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong><em><code>file2.txt</code></em></strong></p>
  
  <pre><code>Hello world!!
  </code></pre>
  
  <p>I have tried following and it didn't work.</p>
  
  <pre><code># sed "/\&lt;tag\&gt;/ {
  h
  r file2.txt
  g
  N
  }" file1.txt
  
  &lt;html&gt;
  &lt;body&gt;
  Hello World!!
  &lt;tag&gt;
  &lt;/tag&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>