Linux下Shell文件内容替换(sed)(转)

sed -i 's/被替换的内容/要替换成的内容/g' file 
#-i为直接修改并保存

参考:

http://blog.sina.com.cn/s/blog_7211cb9201019hgd.html

http://wangchujiang.com/linux-command/c/sed.html