Skip to content

Instantly share code, notes, and snippets.

@uwe-schwarz
Created January 24, 2014 15:25
Show Gist options
  • Select an option

  • Save uwe-schwarz/8599413 to your computer and use it in GitHub Desktop.

Select an option

Save uwe-schwarz/8599413 to your computer and use it in GitHub Desktop.
Find what is mined now on CoinEx
#!/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