I have a config file which may OR may not have tasks commented out. If the tasks are commented, I want to "uncomment them"!
sed -i '/<!--/d; /-->/d testfile
I have this so far but it removes all the comments in the file.
<!--Comment at the top of the file which should not be removed
-->
<!--
<task>
<tag>
<tag1>keep this content </tag1>
</tag>
</task>
-->
I only want to remove comments for task tags which will look like the above in the file (comment won't be on the same line), but keep the content inbetween. Can i use sed to do this without removing any other comments?