How can I replace this with sed
? I need to replace this:
set $protection 'enabled';
to
set $protection 'disabled';
Please note that I can't sed the enabled
to disabled
because it's not only used at this location in the input file.
I tried this but it didn't change anything but gave me no error:
sed -i "s/set $protection 'enabled';/set $protection 'disabled';/g" /usr/local/openresty/nginx/conf/nginx.conf