Created
March 8, 2012 07:58
-
-
Save tikitikipoo/1999539 to your computer and use it in GitHub Desktop.
再帰的にファイルの中の文字列を置換
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
for FILE in `grep -rl 置換前 *`; do cp $FILE $FILE.bak; sed -e "s/置換前/置換後/g" $FILE.bak > $FILE; rm $FILE.bak; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment