Created
April 24, 2012 15:46
-
-
Save blakesmith/2480878 to your computer and use it in GitHub Desktop.
Rails global find/replace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export search="Find string" | |
export replace="Replace string" | |
grep -l -R $search app spec lib | xargs sed -i -e "s/$search/$replace/g" | |
find . -name "*-e" | xargs rm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment