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.
For Example, I have mentioned the path name in a file :-
path = /home/test/db
My name is so and
path = /home/test/db
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.
Thanks and Regards,