2010-10-13 195 views

回答

6

使用sed 's/.*apples.*/oranges/'

0

您可以使用AWK

$ awk '/apples/{$0="orange"}1' file 
tomatoes 
bananas 
orange 
pears 
orange 

這個說來搜索蘋果,然後改變整個記錄爲「橙色」。

相關問題