I have below command to find all the .xml
files containing the <active>true</active>
having <codePool>community</codePool>
after that line on next line.
grep -rzl '<active>true</active>.*<codePool>community</codePool>' --include='*.xml' --color=always
Now how to combine this with sed
to replace true
string inside the <active>...
tag to false
string along those matched lines ?