title: sed command add multiple lines bash
body: <p>I am new to bash coding in Linux.I want to add plugin to my existing pom file in maven project.So want to add this plugin.This is the way i changed file.But it failed.</p>
  
  <pre><code>sed -i "47 i\&lt;plugin&gt;
                 &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                 &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                 &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                 &lt;/configuration&gt;
            &lt;/plugin&gt;"
  
  " animalNames.txt 
  </code></pre>