Skip to content

Instantly share code, notes, and snippets.

@blasterpal
Created January 9, 2014 19:09
Show Gist options
  • Select an option

  • Save blasterpal/8340038 to your computer and use it in GitHub Desktop.

Select an option

Save blasterpal/8340038 to your computer and use it in GitHub Desktop.
find and replace with sed using find
for FILE in `find . -type f -name *.rb`; do
sed -i '' 's/old-method/new_method/g' $FILE
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment