This one is quite easy, but a little tricky. Had to do this for work as one of our groups was changing their email address and a few of the repo’s they used had files that depended on that email.
A couple requirements to keep in mind:
- Had to be recursive
- Had to excude certain file types
- Had to do the replacement in an svn repository, which apparantly is difficult.
Here is what I came up with that works pretty well:
grep -rsl --exclude='*.crt' --exclude='*.pem' "[email protected]" | xargs sed -i 's/[email protected]\.net/[email protected]\.net/g'
And then I needed to commit:
svn commit -m "these files have been modified to reflect the new [email protected] email address we are utilizing."