Created
May 10, 2019 15:51
-
-
Save wmelton/4289906ad7819f6070d3be8066e43dac to your computer and use it in GitHub Desktop.
In-place search and replace using grep and sed
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
grep -Rl text_to_find directory_to_search 2>/dev/null | while read line; do sed -i 's/text_to_find/replacement_text/g' $line; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment