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:

  1. Had to be recursive
  2. Had to excude certain file types
  3. 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."  

Done!

Blog Logo

Mario Loria


Published

Image

./scriptthe.net

Because 127.0.0.1 gets old after a while.

Back to Overview