Bugzilla + Command or Script to add text to parameter 'shutdownhtml' in param file

StackOverflow https://stackoverflow.com/questions/16583934

  •  29-05-2022
  •  | 
  •  

Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top