Created
November 13, 2018 21:57
-
-
Save CharlieGreenman/cab57a5a22c22508d43809de806b0bfd to your computer and use it in GitHub Desktop.
Find and replace text using bash
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
# On mac: | |
git grep -l 'original_text' | xargs sed -i '' -e 's/original_text/new_text/g' | |
# On linux | |
git grep -l 'original_text' | xargs sed -i 's/original_text/new_text/g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment