similar to these questions:
- modify config file using bash script
- How do I use sed to change my configuration files, with flexible keys and values?
In a file like this:
define('_DB_NAME_', 'anything');
define('_DB_USER_', 'something else');
define('_DB_PASSWD_', 'and another value');
how to use sed to replace the value anything
, something
and another
(which are unknown) by refering to the key values _DB_NAME_
, _DB_USER_
and _DB_PASSWD
?