Skip to content

Instantly share code, notes, and snippets.

@marty-Wallace
Created March 10, 2017 00:49
Show Gist options
  • Save marty-Wallace/a0ec7cea9c07176bbc6f1740547d37d0 to your computer and use it in GitHub Desktop.
Save marty-Wallace/a0ec7cea9c07176bbc6f1740547d37d0 to your computer and use it in GitHub Desktop.
Check the current market price of Bitcoin in USD and CAD and print it out
echo -n 'Current price of bitcoin in ' ; curl -s https://blockchain.info/ticker | grep USD | tr -s ' ' | tr -d '"' | tr -d ' ' | cut -d ':' -f 1,3 | cut -d ',' -f 1
echo -n 'Current price of bitcoin in ' ; curl -s https://blockchain.info/ticker | grep CAD | tr -s ' ' | tr -d '"' | tr -d ' ' | cut -d ':' -f 1,3 | cut -d ',' -f 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment