I'm trying to change the value of malloc to say 1234m via a bash script but not seeing any changes. I presume it is an issue with my regex, can anybody see what I've done inncorrectly?
String
DAEMON_OPTS="-a :6081 \
-T localhost:6082 \
-f /etc/varnish/default.vcl \
-S /etc/varnish/secret \
-s malloc,256m"
Code
# get the memory allocation
echo "Enter the memory allocation"
read malloc
# update the default config
sed -ie 's/malloc,.*[0-9m]$/malloc,'$malloc'/gI' /etc/default/varnish