Skip to content

Instantly share code, notes, and snippets.

@CharlieGreenman
Created November 13, 2018 21:57
Show Gist options
  • Save CharlieGreenman/cab57a5a22c22508d43809de806b0bfd to your computer and use it in GitHub Desktop.
Save CharlieGreenman/cab57a5a22c22508d43809de806b0bfd to your computer and use it in GitHub Desktop.
Find and replace text using bash
# On mac:
git grep -l 'original_text' | xargs sed -i '' -e 's/original_text/new_text/g'
# On linux
git grep -l 'original_text' | xargs sed -i 's/original_text/new_text/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment