I am trying to find {AUTH-KEYS-SALTS}
in the file wp-config.php
and replace it with the contents of the bash variable keysalts
.
keysalts=`curl -sS https://api.wordpress.org/secret-key/1.1/salt/`
sed -i "s/{AUTH-KEYS-SALTS}/$keysalts/g" wp-config.php
The following almost works, except that keysalts
has a bunch of special characters such as $`;'" and sed is getting confused. Basically, how do I escape everything and just replace {AUTH-KEYS-SALTS} with $keysalts?
Thanks.