I'm writing a bash script to launch curl requests I'm reading the input of the user and save it an variable
read theterm
Let's say the user typed :
"Hello World"
I am passing the variable to the curl request as follow :
curl 'https://someurl.com' -H ... --data '{"term":'$theterm',....}'
So while debugging my data looked like :
--data {"term" :"Hello' 'World"...}
while it was supposed to be :
--data {"term" : "Hello World"....}
Any suggestions ?