标签: sed
我想仅在前面有omg的条目中将'line'更改为'row'。你知道怎么做吗?
pluto% cat test omg this is 1st line omg this is 2nd line omg this is 3rd line this is 4th line omg this is 5th line
答案 0 :(得分:2)
这应该这样做:
sed -e '/^omg/s/line/row/'