From 5a2699e54d3c94575d691a8b6b5ed95eefaf8f29 Mon Sep 17 00:00:00 2001 From: Shannon Appelcline Date: Tue, 9 May 2017 11:35:48 -0700 Subject: [PATCH] Update 4_2__Interlude_Using_JQ.md --- 4_2__Interlude_Using_JQ.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/4_2__Interlude_Using_JQ.md b/4_2__Interlude_Using_JQ.md index 6e04659..af41d5b 100644 --- a/4_2__Interlude_Using_JQ.md +++ b/4_2__Interlude_Using_JQ.md @@ -406,6 +406,10 @@ btcin=$(for ((i=0; i<${#usedtxid[*]}; i++)); do txid=${usedtxid[i]}; vout=${used btcout=$(bitcoin-cli decoderawtransaction $1 | jq -r '.vout [] | .value' | awk '{s+=$1} END {print s}') echo "$btcin-$btcout"| /usr/bin/bc ``` +Be sure the permissions on the script are right: +``` +$ chmod 755 txfee-calc.sh +``` You can then run the script as follows: ``` $ ./txfee-calc.sh $rawtxhex