Skip to content

Commit

Permalink
add config/luastatus/cryptocurr.bash
Browse files Browse the repository at this point in the history
  • Loading branch information
safocl committed Dec 24, 2017
1 parent 69408d2 commit 31882fa
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .config/luastatus/cryptocurr.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! /bin/bash
dash=$(curl -s https://coinmarketcap.com/currencies/dash/|sed -n '/class="text-large2" data-currency-value/p')
btc=$(curl -s https://coinmarketcap.com/currencies/bitcoin/|sed -n '/class="text-large2" data-currency-value/p')
eth=$(curl -s https://coinmarketcap.com/currencies/ethereum/|sed -n '/class="text-large2" data-currency-value/p')
ltc=$(curl -s https://coinmarketcap.com/currencies/litecoin/|sed -n '/class="text-large2" data-currency-value/p')


dash=${dash#*>}
btc=${btc#*>}
eth=${eth#*>}
ltc=${ltc#*>}

dash=${dash%%<*}
btc=${btc%%<*}
eth=${eth%%<*}
ltc=${ltc%%<*}


echo "BTC:\$$btc LTC:\$$ltc DASH:\$$dash ETH:\$$eth"
unset dash btc eth ltc

0 comments on commit 31882fa

Please sign in to comment.