Linux 批量替换
代码格式:oldstring被替换的字符串
sed -i "s/oldstring/newstring/g" `grep oldstring -rl path`;
sed -i "s/192.168.0.2/192.168.0.3" `grep 192.168.0.2 -rl /home/project`;
将/home/project下面的所有含有192.168.0.2 的字符串替换成 192.168.0.3
相关推荐
onlykg 2020-05-06
farwang 2020-04-26
yonggeno 2020-04-15
圆圆的世界CSDN 2020-04-06
圆圆的世界CSDN 2020-01-30
WindowsandLinux 2016-12-13
KINGJENSEN 2016-10-14
LinuxNotes 2016-07-13
wpxiaoaojianghu 2015-04-07
hufanglei00 2014-01-22
gongxucheng 2014-01-16
SlowWakler 2013-04-06
刘涛 2011-11-15
小表弟皮卡丘 2011-09-13
lerdor 2011-08-10
amethystqi 2011-05-09
ITlover00 2011-04-01
vickytong0 2011-03-24