我有一个像
Fixed pattern
text which can change(world)
我想用
Fixed pattern
text which can change(hello world)
我想用什么
cat myfile | sed -e "s#\(Fixed Pattern$A_Z_a_z*\(\)#\1 hello#g > newfile
UPDATE:上面的world这个词也是一个变量,会改变 基本上在表达式后面遇到的第一个括号后面加上hello。
提前致谢。