Created
January 5, 2016 18:47
-
-
Save veltman/df317e2738742deb99d9 to your computer and use it in GitHub Desktop.
Recursive in-place sed replacement from a list of files
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
for x in `grep -rl 'onlyfilesthatcontainthis' *`; do sed -i '' 's/replacethis/withthis/' $x; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment