Last active
September 3, 2015 18:28
-
-
Save ggarnier/0ef03a10a9d8d41232d2 to your computer and use it in GitHub Desktop.
Find/replace in multiple files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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