Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/sh
# Requires jq
# Remember to chmod +x!
#
# Add the following cron-job (using "crontab -e") to run at hourly intervals:
# 0 * * * * export DISPLAY=:0.0 && /bin/bash <SCRIPT_PATH_GOES_HERE> > /dev/null 2>&1
# Change <SCRIPT_PATH_GOES_HERE> to the appropriate name
BTCE_PRICE="$(curl -s https://btc-e.com/api/2/btc_usd/ticker | jq '.ticker.last')"
MTGOX_PRICE="$(curl -s http://data.mtgox.com/api/2/BTCUSD/money/ticker_fast | jq '.data.last.display' | cut -d "\"" -f 2)"
notify-send "MtGox: $MTGOX_PRICE
BTC-e: \$$BTCE_PRICE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.