Last active
December 17, 2015 22:29
-
-
Save zhujunsan/5682609 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
find -name '*.conf' | xargs sudo sed -i "s/\(\$1\..*\.baixing\.cn\)$/\1\$2/g" | |
find -name '*.conf' | xargs sudo perl -pi -e 's|com\$|com(.*)\$|g' | |
find -name '*.conf' | xargs sudo sed -i "s/\(s\..*\.baixing\.cn\)\//\1:3005\//g" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment