I'm just trying to replace a setting in a php.ini file using a bash script.
This is my case:
I have a very specific setting and the default is:
Now, I'm trying to replace this by
sed to this:
date.timezone = "America/Mexico_City"
And the command that I'm trying to use is this:
sed -i '/^;date\.timezone[[:space:]]=.*$/date.timezone = "America/Mexico_City"' php.ini
But I get this:
sed: -e expression #1, char 35: extra characters after command
I don't really know why but if I leave just a character it works (not the expected way but it doesn't return an error). Example:
sed -i '/^;date\.timezone[[:space:]]=.*$/d' php.ini
This just removes the line
I'm really new to sed and I'd really appreciate any help.