Last active
January 30, 2018 16:22
-
-
Save sven-bock/3d0517a8a3f41799ebb5863917317496 to your computer and use it in GitHub Desktop.
Quickly replace all "strings" 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
# Replace OLD with the string you want to replace, and NEW with the string you want to insert | |
find ./ -type f -exec sed -i -e 's/OLD:/NEW:/g' {} \; | |
grep -rl 'OLD' . | xargs sed -i 's/OLD/NEW/g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment