I am trying to delete a line from XML file using SED. i.e. sed -i "/Mansing/d" /home/test.xml but it deleting both the lines one with having 'Mansing' and other with 'MansingTest' as in Resource name value. Any help? XML file is as below
<a>
<Resource name="Mansing" auth="container" url="jdbc:mysql:"" />
<Resource name="MansingTest" auth="container" url="jdbc:mysql:"" />
<c>
<Test>tterer</test>
</c>
</a>
xmlaware tools likexmlstarletand not blunt text processing tools./\"Mansing\"/? But @Inian has a valid point: Use a proper tool for the job.