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

posted @ 2017-12-10 22:01  EasonJim  阅读(2791)  评论(0编辑  收藏  举报