Skip to content

Instantly share code, notes, and snippets.

@lakshyabatman
Created January 9, 2021 14:29
Show Gist options
  • Save lakshyabatman/0cd78f530374a0e6247fb8d3d6cafdab to your computer and use it in GitHub Desktop.
Save lakshyabatman/0cd78f530374a0e6247fb8d3d6cafdab to your computer and use it in GitHub Desktop.
Small script to show bitcoin price on terminal!
#!/bin/bash
#A Shell script to fetch bitcoin price and display !
#Author: Lakshya Khera
#Dependencies
# - jq https://stedolan.github.io/jq/
# - lolcat https://github.com/busyloop/lolcat/
#
bitcoin_price=$(curl -s https://api.coindesk.com/v1/bpi/currentprice.json | jq '.bpi.USD.rate ')
echo "Bitcoin price is ${bitcoin_price}" | lolcat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment