飞身剑客吧 关注:6贴子:163
  • 0回复贴,共1

linux批量替换

只看楼主收藏回复

sed -i "s/中国商业电讯/商业电讯/g" `grep 中国商业电讯 -rl /prnews/webapp/include` sed -i "s/中国商业电讯/商业电讯/g" `grep 中国商业电讯 -rl /prnews/webapp/aboutus`
sed -i "s/China Business Press Release Newswire/Business Press Release Newswire/g" `grep "China Business Press Release Newswire" -rl /prnews/webapp/aboutus` sed -i "s/中国商业电讯(China Business Press Release Newswire)/商业电讯(Business Press Release Newswire)/g" `grep 中国商业电讯(China Business Press Release Newswire) -rl /prnews/webapp/aboutus`
商业电讯(China Business Press Release Newswire)
find .|xargs grep -ri "中国商业电讯" find .|xargs grep -ri "马德伟" sed -i "s/马德伟/丁朋/g" `grep 马德伟 -rl /prnews/webapp/aboutus` sed -i "s/madw@staff.tixa.com/dingpeng@staff.tixa.com/g" `grep madw@staff.tixa.com -rl /prnews/webapp/aboutus`
sed -i "s/lvlt@staff.tixa.com/dingpeng@staff.tixa.com/g" `grep lvlt@staff.tixa.com -rl /prnews/webapp/aboutus` madw@staff.tixa.com lvlt@staff.tixa.com


回复
1楼2019-01-16 11:35