curl -X DELETE -d '{"ruleid": "${value}"}' 'http://192.168.0.12:8080/wm/firewall/rules/json'
This command can't run correctly. I don't know how to handle this value parameter. How to use the quotes?
#! /bin/bash
# delete a firewall rule
value=x
if [ $1 != "" ]; then
value=$1
echo "$value"
curl -X DELETE -d '{"ruleid": "${value}"}' http://192.168.0.12:8080/wm/firewall/rules/json
exit 0
else
echo "no parameter "
exit 0
fi