Skip to content

Instantly share code, notes, and snippets.

@sven-bock
Last active January 30, 2018 16:22
Show Gist options
  • Save sven-bock/3d0517a8a3f41799ebb5863917317496 to your computer and use it in GitHub Desktop.
Save sven-bock/3d0517a8a3f41799ebb5863917317496 to your computer and use it in GitHub Desktop.
Quickly replace all "strings" in files recursively
# Replace OLD with the string you want to replace, and NEW with the string you want to insert
find ./ -type f -exec sed -i -e 's/OLD:/NEW:/g' {} \;
grep -rl 'OLD' . | xargs sed -i 's/OLD/NEW/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment