Skip to content

Instantly share code, notes, and snippets.

@JrGoodle
Last active August 29, 2015 14:14
Show Gist options
  • Save JrGoodle/4e1b9cbb0446901a7423 to your computer and use it in GitHub Desktop.
Save JrGoodle/4e1b9cbb0446901a7423 to your computer and use it in GitHub Desktop.
find and replace with ack and perl regex
ack -l 'PATTERN' | xargs perl -pi -E 's#PATTERN#REPLACEMENT#g'
ack -lQ '${PATTERN}' | xargs perl -pi -E 's#\${PATTERN}#\${REPLACEMENT}#g'
@rdasxy
Copy link

rdasxy commented Jan 29, 2015

This is where you need to use sed & awk.

@JrGoodle
Copy link
Author

JrGoodle commented Feb 7, 2015

yeah, I still need to read that post you sent me. wanna fork it and modify it to use sed and awk?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment