I have an XML file which contain portion as given below.
<Target name=something>
< other content here>
</Target>
Now how can I remove this content from my file using sed command? I tried the below but didn't work.
sed -ir 's/\<Target Name\=.*.\<\/Target\>//g' filename
Please advice.
\<
and\>
may have special meaning:[<]
and[>]
will match the literals in all cases. But you will need to do a lot more to match patterns over multiple lines: I commend this tutorial: not easy reading, but explainingsed
never can be.