I'm using the jq tool to handle some JSON in bash.
Just one problem, while using this line:
PB_ACL="acl="`echo $IMGREQ | jq -r'.data.acl'` Result:
echo $PB_ACL // acl= The expected value jq has to filter out is: "acl":"public-read" But it's not working now. I think it has to to with the dash (-) symbol.
How do I escape such incoming string data?
PB_ACL="acl=$(echo $IMGREQ | jq -r'.data.acl')"(Or use the backticks, just leave it inside the double quotes)