I need to delete two blocks of text from multiple files. The two blocks are:
<sales_end_date>None</sales_end_date>
... some text
<unavailable_for_vod_date>None</unavailable_for_vod_date>
How would I properly do the equivalent of:
find ./ -type f -name 'xml' -exec sed -i
'**remove <sales_end_date>None</sales_end_date>' {} \;
I think you are looking for:
But I wouldn’t call this doing it properly. The
-ioption to sed is arguably never proper to use at all, and parsing xml with sed is rightly considered an abomination. However, this should do the job.