amuck-landowner

Sed Command Help

clarity

Active Member
Can someone here help me make this sed command work? I have been at it for 30 minutes, and I still have not figured it out.

Code:
sed -i "s|$rcmail_config['default_host'] = ''|$rcmail_config['default_host'] = '%s'|" /var/www/roundcube/config/main.inc.php
 

clarity

Active Member
Think that I have found something. 


sed -i "s|^\(\$rcmail_config\['default_host'\] =\).*$|\1 \'%s\';|" /var/www/roundcube/config/main.inc.php
Works!
 
Top
amuck-landowner