【shell脚本】使用sed快速批量替换文件中的字段

使用sed快速批量替换文件夹内的文件中的某个字段

sed -i "s/192.168.118.231/192.168.118.138/g"  /usr/local/app/tars/tarsnode/data/tars.tarsAdminRegistry/conf/tars.tarsAdminRegistry.config.conf 
sed -i "s/192.168.118.231/192.168.118.138/g"  /usr/local/app/tars/tarsnode/data/tars.tarsnotify/conf/tars.tarsnotify.config.conf               
sed -i "s/192.168.118.231/192.168.118.138/g"  /usr/local/app/tars/tarsnode/data/tars.tarsproperty/conf/tars.tarsproperty.config.conf           
sed -i "s/192.168.118.231/192.168.118.138/g"  /usr/local/app/tars/tarsnode/data/tars.tarsqueryproperty/conf/tars.tarsqueryproperty.config.conf 
sed -i "s/192.168.118.231/192.168.118.138/g"  /usr/local/app/tars/tarsnode/data/tars.tarsquerystat/conf/tars.tarsquerystat.config.conf         
sed -i "s/192.168.118.231/192.168.118.138/g"  /usr/local/app/tars/tarsnode/data/tars.tarsstat/conf/tars.tarsstat.config.conf                   
sed -i "s/192.168.118.231/192.168.118.138/g"  /usr/local/app/tars/tarsnode/data/tars.tarsregistry/conf/tars.tarsregistry.config.conf           
sed -i "s/192.168.118.231/192.168.118.138/g"  /usr/local/app/tars/tarsnode/data/tars.tarsconfig/conf/tars.tarsconfig.config.conf               

猜你喜欢

转载自blog.csdn.net/Edidaughter/article/details/114274606
今日推荐