Skip to content

Instantly share code, notes, and snippets.

@dseg
Created June 1, 2017 15:19
Show Gist options
  • Save dseg/1eb62b6a9abbd1fae2eeea4f475c377a to your computer and use it in GitHub Desktop.
Save dseg/1eb62b6a9abbd1fae2eeea4f475c377a to your computer and use it in GitHub Desktop.
satoshi2btc.sh
# Usage: btc bitcoin_amount_in_satoshi
# $ btc 1550000000
# 15.50000 BTC
#
function btc {
if [[ -n $1 ]]; then
btc=$(bc -l <<< "$1 / 100000000.0")
printf '%.5f BTC\n' $btc
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment