Created
May 15, 2019 13:50
-
-
Save uilian/94bc36f9e973e2cd116dbfe12d8eaa9a to your computer and use it in GitHub Desktop.
Find all files containing some text, then replace by something else
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
ag -l "TEXT_TO_FIND" . | xargs sed -i.bak 's/TEXT_TO_FIND/NEW_TEXT_TO_REPLACE/g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment