Skip to content

Instantly share code, notes, and snippets.

@ggarnier
Last active Sep 3, 2015
Embed
What would you like to do?
Find/replace in multiple files
oldstring="describe"
newstring="RSpec.describe"
path=path/to/files
grep -rl $oldstring $path/* | xargs sed -i '' s/$oldstring/$newstring/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment