Last active
April 11, 2022 23:28
-
-
Save pazams/0ddcff0ecfff5b9172337499447e07c4 to your computer and use it in GitHub Desktop.
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 & Sed (w/ backup) | |
ag -0 -l . | xargs -0 sed -ri.bak -e 's/find/replace/g' | |
# Ag & Sed (w/o backup) | |
ag -0 -l . | xargs -0 sed -ri -e 's/find/replace/g' | |
# Perl | |
LC_ALL=en_US.UTF-8 perl -i -w -pe 's/old/new/g' $(find . -name \*.* -print) | |
# Perl (with multiline search) | |
LC_ALL=en_US.UTF-8 perl -i -w -p0e 's/old/new/g' $(find . -name \*.* -print) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment