Forum OpenACS Development: OT: Replace /usr/local/pgsql with $PG_INSTALL in files

For my installation script at http://cognovis.de/developer/en/pg82 I need to replace the /usr/local/pgsql in the postgresql.txt with the value of the variable $PG_INSTALL

I thought doing it this way:

perl -pi.bak -e "s/\/usr\/local\/pgsql/$PG_INSTALL/g" openacs-4/packages/acs-core-docs/www/files/postgresql.txt

Sadly this does not work as $PG_INSTALL is "/usr/local/pg82" which does not bode well as for the above command it would have to be "\/usr\/local\/pg82"

Any clue how I can do this? This would be highly appreciated.

How about:

perl -pi.bak -e "s%/usr/local/pgsql%$PG_INSTALL%g" openacs-4/packages/acs-core-docs/www/files/postgresql.txt