Created
March 17, 2015 00:38
-
-
Save Rodrigora/d3bf1bdeaa1e91ce9d7b to your computer and use it in GitHub Desktop.
find and replace text in files recursively
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
# find text in files | |
grep -r "Text To Search" /path/to/search | |
# replace text in files | |
find . -name show.html.erb -exec sed -i "s/Text To Search/Text To Replace/g" {} \; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment