sed preview only lines that changes

Reference

http://vpsdoctor.com/blog/preview-changes-made-with-sed/

sed -n 's/domain1.com/domain2.com/gp' file.conf

The -n tell sed to not automatically print all lines. The the p at the end tell sed to print the lines that match your search (domain1.com).