title: Find and Replace HTML tag using SED in Shell
body: <p>What I want to achieve is, replace a html tag with modified tag in file using Shell script. When I googled for find and replace using Shell, I came to know about SED. I tried for my purpose, but it throws the error. My code is,</p>
  
  <pre><code>pattern='&lt;html style=background-color:#ffffff;&gt;'
  replacement='&lt;html style=background-color:#ffffff; manifest="app.appcache"&gt;'
  
  cat "index.html"  | sed "/s/$pattern/$replacement/" &gt; "index2.html"
  </code></pre>
  
  <p>I'm getting the below error,</p>
  
  <pre><code>sed: 1: "/s/&lt;html style=backgrou ...": invalid command code &lt;
  </code></pre>
  
  <p>From few other stackoverflow questions, I tried without using </p>
  
  <pre><code>pattern='&lt;html style=background-color:#ffffff;&gt;'
  replacement='&lt;html style=background-color:#ffffff; manifest="app.appcache"&gt;'
  
  sed "/s/$pattern/$replacement/" &lt;"index.html" &gt;"index2.html"
  </code></pre>
  
  <p>I'm getting the same error.</p>
  
  <p>Please help me how to do this.</p>