Created
January 24, 2014 15:25
-
-
Save uwe-schwarz/8599413 to your computer and use it in GitHub Desktop.
Find what is mined now on CoinEx
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/bash | |
| tmp=$(mktemp) | |
| curl -s 'https://coinex.pw/api/v2/currencies' | ~/bin/json.sh > $tmp | |
| # no DOGE (31) and TAG (23) | |
| scrypt=$(grep 'algo.].*scrypt' $tmp | cut -d, -f2 | egrep -v '23|31') | |
| max=$( | |
| for id in $scrypt; do | |
| awk "/$id,.mining_score.]/{print \$2,\"$id\"}" $tmp | |
| done | sort -n | tail -n 1 | awk '{print $2}') | |
| grep ..currencies.,$max,.name $tmp | |
| rm -f $tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment