<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE sailpoint PUBLIC 'sailpoint.dtd' 'sailpoint.dtd'>
<sailpoint>
<ImportAction name='include' value='custom/Application/CARD/CommonCardFiles/COF Imaging Applications Custom Object.xml'/>
<ImportAction name='include' value='custom/Configuration/COF - Singlenter code heree Entitlement Application Custom Object.xml'/>
<ImportAction name='include' value='custom/Rule/COF Related Application Library.xml'/>
<ImportAction name='include' value='custom/Form/COF LCM CBT Form.xml'/>
<ImportAction name='include' value='custom/Workflow/COF Identity Refresh Bypass.xml'/>
<ImportAction name='include' value='custom/Configuration/COF Unstable Roles Config.xml'/>
<ImportAction name='include' value='custom/Application/CARD/CommonCardFiles/COF Salesforce Common Correlation Rule.xml'/>
<ImportAction name='include' value='custom/Rule/COF Single SOD Violation Detection Rule.xml'/>
<ImportAction name='include' value='custom/Configuration/COF APPLICATION DEPENDENCY
</sailpoint>*
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
sed '/<custom&Application>/s/\(.*\)/<--\1-->/' est.xml > new.xml
XML data should be parsed with an XML parser.
You can delete those tags with xmlstarlet
I'm not sure how to comment them.
This should work
sed -e '/custom\/Application/s/\(^.*$\)/<!--\1-->/' est.xml > new.xml
You can match the complete lines with
custom
andApplicatioin
in it. Use&
for the matched string.