I have multiple XML files with strings that are all set to
<msg type="Status"
Some of these strings should be type "Warning" and I have a separate text file with the warning strings.
I can do a
grep -f strings.txt *.xml
this allows me to see which warning strings are incorrectly listed as status strings. What I would like to do is
grep -f strings.txt *.xml | sed 's/status/warning/'
This gives me my desired output, but it is only being displayed (not saved). There are multiple xml files so i can't just save the output to one file. I need sed to replace the string in the original .xml file it originated from. Thanks for your help.