Skip to content

Instantly share code, notes, and snippets.

@rrichards
Forked from mgoodness/find-replace.sh
Created May 28, 2019 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rrichards/a7ea06b2c8cfabc7c3616ea5b6324198 to your computer and use it in GitHub Desktop.
Save rrichards/a7ea06b2c8cfabc7c3616ea5b6324198 to your computer and use it in GitHub Desktop.
find-replace() {
for m in (ag --files-with-matches -- $1); do
sed -i '' -e "s/$1/$2/g" $m
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment