Skip to content

Instantly share code, notes, and snippets.

@goaquin
Last active February 3, 2017 13:23
Show Gist options
  • Save goaquin/f6892f8daacfb7074fdadb860cbdf009 to your computer and use it in GitHub Desktop.
Save goaquin/f6892f8daacfb7074fdadb860cbdf009 to your computer and use it in GitHub Desktop.
#option 1: good
SIZE=`curl -k -H 'Content-Type:application/json' -H "Authorization:Bearer $token" -X GET 'URL' | jq '.size'`
#option 2: got parse error
line=`curl -k -H 'Content-Type:application/json' -H "Authorization:Bearer $token" -X GET 'URL'`
SIZE=`${line} | jq '.size'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment