From 16051c01c2f09c3c69677cc3cf3952b62690c485 Mon Sep 17 00:00:00 2001 From: sneak Date: Tue, 9 Nov 2021 09:50:04 -0800 Subject: [PATCH] add microbtc conversion script --- bin/ubtc | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 bin/ubtc diff --git a/bin/ubtc b/bin/ubtc new file mode 100755 index 0000000..9dd4007 --- /dev/null +++ b/bin/ubtc @@ -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 +