sed地址模式

sed地址模式,sed,Sed,我只想在前面有omg的条目中将“行”更改为“行”。你知道怎么做吗 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 这应该做到: sed -e '/^omg/s/line/row/'

我只想在前面有omg的条目中将“行”更改为“行”。你知道怎么做吗

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
这应该做到:

sed -e '/^omg/s/line/row/'