Skip to content

Instantly share code, notes, and snippets.

@farinspace
Created July 19, 2017 06:54
Show Gist options
  • Save farinspace/f580d8ef94b5b221cba5dda27440d420 to your computer and use it in GitHub Desktop.
Save farinspace/f580d8ef94b5b221cba5dda27440d420 to your computer and use it in GitHub Desktop.
cli bitcoin sync status
BC_CURRENT=`bitcoin-cli getblockcount 2>&1`; BC_HEIGHT=`wget -O - http://blockchain.info/q/getblockcount 2>/dev/null`; perl -E "say sprintf(’Block %s of %s (%.4f%%), %s blocks remaining.', $BC_CURRENT, $BC_HEIGHT, ($BC_CURRENT/$BC_HEIGHT)*100, $BC_HEIGHT-$BC_CURRENT)";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment