summaryrefslogtreecommitdiff
path: root/bitcoin-bal
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-10-28 21:53:31 -0400
committerBen Sima <ben@bsima.me>2020-10-28 21:53:31 -0400
commita46e6aec3e52dfe422f927d2e4c66de15a9ad90c (patch)
tree1fb636bf075ffcd10e4afc606d01b18472936fd8 /bitcoin-bal
parent3e767bf301e7b00c708275ed3f55abb57951f150 (diff)
add bitcoin-bal
Diffstat (limited to 'bitcoin-bal')
-rwxr-xr-xbitcoin-bal5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitcoin-bal b/bitcoin-bal
new file mode 100755
index 0000000..1fd7fb3
--- /dev/null
+++ b/bitcoin-bal
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+btc=$(hledger bal cur:BTC ^as | tail -n1 | tr -d ' BTC')
+usd=$(echo "$1 * $btc" | bc)
+echo "$btc BTC"
+echo "$usd USD"