add microbtc conversion script

This commit is contained in:
Jeffrey Paul 2021-11-09 09:50:04 -08:00
parent c1300f968d
commit 16051c01c2
1 changed files with 7 additions and 0 deletions

7
bin/ubtc Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
UBTC="$1"
BTC="$(echo "scale=6 ; $UBTC / 1000000" | bc)"
BTCUSD="$(curl -sS https://blockchain.info/ticker | jq -r '.USD.last')"
echo \$$(echo "scale=2 ; ( $BTC * $BTCUSD ) /1.00" | bc) USD