Skip to content

Instantly share code, notes, and snippets.

@mgoodness
Created January 5, 2019 02:39
Show Gist options
  • Save mgoodness/600f9c9da8679cca98732dbf8a6c4411 to your computer and use it in GitHub Desktop.
Save mgoodness/600f9c9da8679cca98732dbf8a6c4411 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