From 8602b7b71d98d59610719428c591c8769660a790 Mon Sep 17 00:00:00 2001 From: wintercooled Date: Thu, 22 Mar 2018 14:22:19 +0000 Subject: [PATCH] Update 04_2__Interlude_Using_JQ.md Fixed minor typos --- 04_2__Interlude_Using_JQ.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/04_2__Interlude_Using_JQ.md b/04_2__Interlude_Using_JQ.md index 1f42b7b..12d5348 100644 --- a/04_2__Interlude_Using_JQ.md +++ b/04_2__Interlude_Using_JQ.md @@ -362,12 +362,12 @@ Whew! **Usage Example:** _Calculate the fee for a transaction._ -To figure out the complete transaction fee at this point just requires one more bit of math: determining out how much money is going through the .vout. That's a simple use of JQ where you just use `awk` to sum up the `value` of all the `vout` information: +To figure out the complete transaction fee at this point just requires one more bit of math: determining how much money is going through the .vout. That's a simple use of JQ where you just use `awk` to sum up the `value` of all the `vout` information: ``` $ bitcoin-cli decoderawtransaction $rawtxhex | jq -r '.vout [] | .value' | awk '{s+=$1} END {print s}' 1.045 ``` -To complete the transaction fee calculation,, you subtract the .vout .amount (1.045) from the .vin .amount (1.3). +To complete the transaction fee calculation, you subtract the .vout .amount (1.045) from the .vin .amount (1.3). Putting it all together creates a complete calculator in just five lines of script: ```