getcode=$(curl http://www.fromsomewhere.com/?xxxxx=1) (from an API that returns a number value. eg 5555)
echo $getcode #5555(able to get #5555)
curl "http://www.fromsomewhere.com/?qs=$getcode&qss=1&qqq=123"
I can't really do this as I found the url looks.
echo "http://www.fromsomewhere.com/?qs=$getcode&qs.condition=1&qqq=123"
the output is: &qs.condition=1&qqq=123e.com/?qs=555
It replaces the url http://......
What is the proper solution to have the url print properly like
"http://www.fromsomewhere.com/?qs=5555&qs.condition=1&qqq=123"
?
oddly if I only have
http://www.fromsomewhere.com/?qs=$getcode
the url looks fine.
however, when I add an &
http://www.fromsomewhere.com/?qs=$getcode&qs.condition...
then it looks wrong again