Skip to content

Instantly share code, notes, and snippets.

@X0nic
Last active December 14, 2015 14:38
Show Gist options
  • Save X0nic/5101900 to your computer and use it in GitHub Desktop.
Save X0nic/5101900 to your computer and use it in GitHub Desktop.
Search and replace in a folder
# osx
ack -l "ReplaceMe" | xargs sed -i "" "s/ReplaceMe/withMe/g"
# linux
ack -l "ReplaceMe" | xargs sed -i "s/ReplaceMe/withMe/g"
#amember
ack --php -l "Release: 3\..\..PRO \(.Revision\: .*\)" | xargs sed -i "" "s/Release: 3\..\..PRO.*$/Release: xxxxxxxxxxxxxxxxxxx/g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment