[问题]请教一个sed行中插入文本的问题
发表于 : 2008-01-04 15:47
一个示例行:
There are a lot of problems.
现在想把它变成两行:
There are not a lot of answers ,
instead of problems.
如果用i\插入要执行好几个sed命令来定位。
想用替换的话,有在语法中,在newpattern里指代pattern的通配符吗?
实际问题里的a lot of不是一个常量字符串。
There are a lot of problems.
现在想把它变成两行:
There are not a lot of answers ,
instead of problems.
如果用i\插入要执行好几个sed命令来定位。
想用替换的话,有在
代码: 全选
s/pattern/newpattern/
实际问题里的a lot of不是一个常量字符串。