From 5f5685281977801c2914809486bf2de6a388b143 Mon Sep 17 00:00:00 2001 From: Jakob Alexander <44269459+jakobalexander@users.noreply.github.com> Date: Sat, 24 Nov 2018 15:21:12 +0100 Subject: [PATCH] Shell prompt typos corrected / made uniform --- 04_2__Interlude_Using_JQ.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/04_2__Interlude_Using_JQ.md b/04_2__Interlude_Using_JQ.md index 12d5348..0cb3f43 100644 --- a/04_2__Interlude_Using_JQ.md +++ b/04_2__Interlude_Using_JQ.md @@ -70,7 +70,7 @@ $ bitcoin-cli listunspent | jq -r '.[0]' ``` You can then capture an individual value from that selected array by (1) using a pipe _within_ the JQ arguments; and then (2) requesting the specific value afterward, as in the previous example. The following would capture the `txid` from the 0th JSON object in the JSON array produced by `listunspent`: ``` -~$ bitcoin-cli listunspent | jq -r '.[0] | .txid' +$ bitcoin-cli listunspent | jq -r '.[0] | .txid' 2b5f5798359e0e23e02764588166f222d4ce056419dec83c743b72aad171d708 ``` Carefully note how the `' 's` go around the whole JQ expression _including_ the pipe. @@ -154,7 +154,7 @@ $ bitcoin-cli listunspent | jq -r '.[] | { txid: .txid, vout: .vout, amount: .am ``` You could of course rename your new keys as you see fit. There's nothing magic in the original names: ``` -~$ bitcoin-cli listunspent | jq -r '.[] | { tx: .txid, output: .vout, bitcoins: .amount }' +$ bitcoin-cli listunspent | jq -r '.[] | { tx: .txid, output: .vout, bitcoins: .amount }' { "tx": "2b5f5798359e0e23e02764588166f222d4ce056419dec83c743b72aad171d708", "output": 1, @@ -179,7 +179,7 @@ The JQ lookups so far have been fairly simple: you use a key to look up one or m This example uses the following raw transaction. Note that this is a more complex raw transaction with two inputs and two outputs. We'll learn about making those in a few sections; for now, it's necessary to be able to offer robust examples. Note that unlike our previous examples, this one has two objects in its `vin` array and two in its `vout` array. ``` -$ $ bitcoin-cli decoderawtransaction $rawtxhex +$ bitcoin-cli decoderawtransaction $rawtxhex { "txid": "6f83a0b78c598de01915554688592da1d7a3047eacacc8a9be39f5396bf0a07e", "hash": "6f83a0b78c598de01915554688592da1d7a3047eacacc8a9be39f5396bf0a07e",