2014-07-18 60 views

回答

4

您可以使用此sed命令:

sed -i '/another-pattern/s/pattern/new-string/g' ./file 

這將只匹配another-pattern模式的行進行替換。