Skip to content

Instantly share code, notes, and snippets.

@anulaibar
Created October 17, 2018 12:38
Show Gist options
  • Save anulaibar/d94a40a2195a9b14620b5d5731242d3c to your computer and use it in GitHub Desktop.
Save anulaibar/d94a40a2195a9b14620b5d5731242d3c to your computer and use it in GitHub Desktop.
dir='.'
find="find"
replace="replace"
cd $dir
files=$(git grep -l "$find")
for file in $files; do
sed -i '' -e s/"$find"/"$replace"/g $file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment