I'm using JQ to print out the output I get from a curl request.
Now, while the bash script works fine, I can't seem to be able to get JQ to print multiple returns in one line.
For example, if I do this:
var1 var2 var3 var4 < <(echo $(curl -s 'https://example.com/api/json/APIKEY/'$ip' | jq ".proxy,.vpn,.ISP,.timezone"))
I do get the results. But, if ISP's value is "Google Severs", the output would be
var3: Google
var4: Servers
Thanks for any help you can give me.
I've tried leaving space between the results, to see if that's the issue. But not much else, to be honest.
This is the actual result from CLI command:
curl -s (...) | jq ".proxy,.vpn,.ISP,.timezone" true true "Google Servers" "America/Los_Angeles"
This is the actual result from the script, using the same code: ./script.sh
curl -s (...) | jq ".proxy,.vpn,.ISP,.timezone"
true
true
"Google
Servers"