Created
February 8, 2011 22:50
-
-
Save kbaribeau/817459 to your computer and use it in GitHub Desktop.
the grep garbage is because sed likes to add newlines to the ends of files that don't already end in a newline
This file contains hidden or 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
find . -type f -name \*.rb -exec grep -qi "foo" {} \; -print |xargs sed -i "" -e "s|foo|bar|g" -e "s|Foo|Bar|g" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment