I have a simple sed expression:
sed -i 's/foo/bar/g' blat.xml
Because the expression modifies the file in place it is hard to see which lines were changed.
Is there a way to echo the modified lines to the console?
Something similar to the output from the following would be ideal:
sed -n 's/foo/bar/gp' blat.xml