0

我正在寻找单行命令或一个简单的脚本来在 /var/www/html/bugzilla/data/param 文件中设置“shutdownhtml”。

从...

       'shutdownhtml' => '',

到....

       'shutdownhtml' => 'Archiving DB and Bugzilla config... It could takes 5 min or longer.',

是否尝试使用“sed”,但不知何故上面的配置有 Single Open quote ',所以看起来“sed”无法做到这一点......??

感谢您的帮助。

4

1 回答 1

0

感谢托尔斯滕·舍宁。他提供了一个解决方案。

sed --regexp-extended 's/(.)shutdownhtml\1(\s+)=>(\s+)\1{2},/\1shutdownhtml\1\2=>\3\1someText\1,/' 参数> params.shutdown

有关更多信息,请参阅下面的链接 http://mozilla.6506.n7.nabble.com/Command-or-Script-to-add-text-to-parameter-shutdownhtml-in-param-file-td279974.html

于 2013-05-27T04:27:18.943 回答