How do I find and replace every occurrence of:
subdomainA.example.com
with
subdomainB.example.com
in eve
For me the easiest solution to remember is https://stackoverflow.com/a/2113224/565525, i.e.:
sed -i '' -e 's/subdomainA/subdomainB/g' $(find /home/www/ -type f)
NOTE: -i ''
solves OSX problem sed: 1: "...": invalid command code .
NOTE: If there are too many files to process you'll get Argument list too long
. The workaround - use find -exec
or xargs
solution described above.