How do I find and replace every occurrence of:
subdomainA.example.com
with
subdomainB.example.com
in eve
To cut down on files to recursively sed
through, you could grep
for your string instance:
grep -rl /path/to/folder | xargs sed -i s^^^g
If you run man grep
you'll notice you can also define an --exlude-dir="*.git"
flag if you want to omit searching through .git directories, avoiding git index issues as others have politely pointed out.
Leading you to:
grep -rl --exclude-dir="*.git" /path/to/folder | xargs sed -i s^^^g