【发布时间】:2015-08-02 13:03:44
【问题描述】:
我在文件中有一行,想在它下面添加。 我一直在尝试使用命令
sed -e '/</session-config>/a\<security-constraint>\' -i filename
但它不起作用。错误是:
sed: -e expression #1, char 43: unterminated `s' command
示例输入文件
<more></more>
<session-config>20</session-config>
<otherfields>10</otherfields>
在 sed 命令之后
<more></more>
<session-config>20</session-config>
<security-constraint>
<otherfields>10</otherfields>
请帮忙。
谢谢。
【问题讨论】: