Skip to content
Advertisement

How to comment out a string in xml file in shell

JavaScript

On above mention code i am trying to comment out all the line with pattern custom/Application in it

sed command i use that is not working

JavaScript

Advertisement

Answer

This should work

sed -e '/custom/Application/s/(^.*$)/<!--1-->/' est.xml > new.xml

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement