From: Joseph L. Casale jcasale@activenetwerx.com
To: "centos@centos.org" centos@centos.org Sent: Wed, March 16, 2011 8:56:41 PM Subject: [CentOS] perl one-liner issue
I am trying to deduce the one liner for an rpm I am packaging to edit a php configuration file from within my spec. The line I am editing looks like: $conf['nagios_base'] = "/nagios/cgi-bin";
A sed alternative:
sed -i '/nagios_base/ s//nagios/cgi-bin/xxx/' $FILE or more selective: sed -i '/$conf[.nagios_base.] = / s//nagios/cgi-bin/xxx/' $FILE
JD