shell之sed 記錄

sed 模糊替換 原文件: cat file  BROADCAST_PORT=9999 使用命令: sed -i 's/BROADCAST_PORT=9.*$/BROADCAST_PORT=9032/g' file sed 匹配行數模糊替換 原文件: 使用命令: sed -i '4s/BROADCAST_PORT=.*$/BROADCAST_PORT=9999/g' file  sed -i$(d
相關文章
相關標籤/搜索