Linux sed替换
linux 给文件替换字符串/替换内容/替换某行 (shell,sed)_linux下正则表达式替换文件内容-CSDN博客
# 不加 -i, 预览替换后的数据 ~/sperf/sperf-0018/conf # sed 's/192.168.15.206/192.168.15.2000/g' /root/sperf/sperf-0018/conf/csm.ini { "server": { "ip": "192.168.15.2000", "port": 9158, "timeout": 5 } } ~/sperf/sperf-0018/conf # # 加 -i直接替换,不预览 ~/sperf/sperf-0018/conf # sed -i 's/192.168.15.206/192.168.15.2000/g' /root/sperf/sperf-0018/conf/csm.ini ~/sperf/sperf-0018/conf #

浙公网安备 33010602011771号