When I try to run this cmd via bash like this
Bash Script
mSearchCommand="curl $mSearchCommand --url '${requestURL}'"echo "Search Command $mSearchCommand"mSearchResponse="$(${mSearchCommand})"
Output
Search Command curl -v -X GET --header Authorization:'Bearer ---very long access token---' -s 'https://my-rest-services:443/mypath/someparameters'* URL rejected: Bad hostname* Closing connection* URL rejected: Port number was not a decimal number between 0 and 65535* Closing connection
When I run the follow command on cmd line, it runs perfectly, and returns my json response
curl -v -X GET --header Authorization:'Bearer ---very long access token---' -s 'https://my-rest-services:443/mypath/someparameters'{myjson response}