mirror of
https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
synced 2025-06-08 08:26:17 +00:00
Update 4_2__Interlude_Using_JQ.md
This commit is contained in:
parent
632187a4ab
commit
5a2699e54d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user