Question

I am looking for One Line Command or a simple script to set the 'shutdownhtml' in /var/www/html/bugzilla/data/param file.

From...

       'shutdownhtml' => '',

To....

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

Did try to use "sed" but somehow the config above has Single Open quote ' , so seem like "sed" not able to do this... ??

Thanks for helping.

Was it helpful?

Solution

Thanks to Thorsten Schöning. A solution has provided by him.

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

See the link below for more information http://mozilla.6506.n7.nabble.com/Command-or-Script-to-add-text-to-parameter-shutdownhtml-in-param-file-td279974.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top