Skip to content

Instantly share code, notes, and snippets.

@zhujunsan
Last active December 17, 2015 22:29
Show Gist options
  • Save zhujunsan/5682609 to your computer and use it in GitHub Desktop.
Save zhujunsan/5682609 to your computer and use it in GitHub Desktop.
替换一堆文件中的字符串
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