-
-
Save danikx/19944480d554d0257dc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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