title: sed/awk Insert lines in specific place in file
body: <p>I have an <code>index.html</code> file which contain URLs. Example</p>
  
  <pre><code>    &lt;!-- UC --&gt;
          &lt;A href="uc/live/current/index.html" &gt;UC Live&lt;/A&gt;&amp;nbsp
          &lt;A href="uc/live/" &gt;(All months)&lt;/A&gt;&lt;br&gt;
      &lt;!-- VI --&gt;
          &lt;A href="vi/live/current/index.html" &gt;VI Live&lt;/A&gt;&amp;nbsp
          &lt;A href="vi/live" &gt;(All months)&lt;/A&gt;&lt;br&gt;
      &lt;!-- NQ-PRO --&gt;
          &lt;A href="nq/live/current/index.html" &gt;NQ Live&lt;/A&gt;&amp;nbsp
          &lt;A href="nq/live/" &gt;(All months)&lt;/A&gt;&lt;br&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I want to write script for automation so it will automatically add 3 lines of stanza above the <code>&lt;/body&gt;</code> tag. for example I want to add following line above <code>&lt;/body&gt;</code> tag. I believe we can use sed / awk to do that but don't know how? </p>
  
  <pre><code>&lt;!-- EX --&gt;
          &lt;A href="ex/live/current/index.html" &gt;EX Live&lt;/A&gt;&amp;nbsp
          &lt;A href="ex/live/" &gt;(All months)&lt;/A&gt;&lt;br&gt;
  </code></pre>