title: How to search and replace a content of a file using shell script?
body: <p>I have started learning shell scripting a few days ago. My scenario is, i have to search and replace a content which exists in different lines in a file using shell script.</p>
  
  <p>For Example, I have mentioned the path name in a file :-</p>
  
  <pre><code>path = /home/test/db
  </code></pre>
  
  <p>My name is so and                                                                              </p>
  
  <pre><code>path = /home/test/db
  </code></pre>
  
  <p>Here,
        The path name  "/home" has to be replaced with "/Second" in specified lines of the file using shell script. By using "sed" command i have tried and replaced the content of the file has only one line but i am struggling with replacing which is present in different lines. I am using "If" condition in shell script.Please do help me in resolving this case.</p>
  
  <p>Thanks and Regards,</p>