Overview
Just a quick recipe for performing search & replace on many files at once.
Recipe
Note
|
|
Recipe
1 |
find . -name $NAME -print | xargs sed -i 's/$SEARCH_LITERAL/$REPLACE_LITERAL/g' |
Example to perform replace all occurrences of foo with bar in all php files
1 |
find . -name "*.php" -print | xargs sed -i 's/foo/bar/g' |