[CentOS] perl one-liner issue
John Doe
jdmls at yahoo.comThu Mar 17 10:15:33 UTC 2011
- Previous message: [CentOS] perl one-liner issue
- Next message: [CentOS] skype?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: Joseph L. Casale <jcasale at activenetwerx.com> > To: "centos at centos.org" <centos at 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
- Previous message: [CentOS] perl one-liner issue
- Next message: [CentOS] skype?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list