When I run the following, it works and returns one item.
curl -X POST -d 'tag=jazz' -d 'state=queensland' http://all.api.radio-browser.info/json/stations/search
But in a Bash script, when I use -d 'tag=jazz' -d 'state=queensland'
for RES, I get different outputs.
read -rp "Write your quiry " RES
echo "$RES"
curl -X POST "$RES" http://all.api.radio-browser.info/json/stations/search
I tried this but it didn't work.
curl -X POST http://all.api.radio-browser.info/json/stations/search <<EOF
"$RES"
EOF
How can I use a variable in a Bash script?
-d "'tag=jazz'"
.curl
as one argument, not four.