Last active
August 29, 2015 14:14
-
-
Save JrGoodle/4e1b9cbb0446901a7423 to your computer and use it in GitHub Desktop.
find and replace with ack and perl regex
This file contains hidden or 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
ack -l 'PATTERN' | xargs perl -pi -E 's#PATTERN#REPLACEMENT#g' | |
ack -lQ '${PATTERN}' | xargs perl -pi -E 's#\${PATTERN}#\${REPLACEMENT}#g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
yeah, I still need to read that post you sent me. wanna fork it and modify it to use
sed
andawk
?