doc/offline-signing-tutorial.md redirects PSBT output with append (>>) instead of overwrite (>) in two places:
- doc/offline-signing-tutorial.md:115 —
... | jq -r '.psbt' >> /path/to/funded_psbt.txt - doc/offline-signing-tutorial.md:173 —
... | jq -r .hex >> /path/to/final_psbt.txt
Every later step treats these files as holding exactly one string, consumed via unquoted $(cat ...):
- doc/offline-signing-tutorial.md:127, :133 —
decodepsbt $(cat /path/to/funded_psbt.txt),analyzepsbt $(cat ...) - doc/offline-signing-tutorial.md:170-171 —
walletprocesspsbt $(cat /path/to/funded_psbt.txt) ... - doc/offline-signing-tutorial.md:180 —
sendrawtransaction $(cat /path/to/final_psbt.txt)
If a reader re-runs the send step (e.g. after a typo'd amount, or to redo the flow) without deleting the output file first, >> appends a second PSBT line instead of replacing it. Unquoted $(cat file) then word-splits on the newline, turning one intended argument into two, which every consuming RPC (decodepsbt, analyzepsbt, walletprocesspsbt, sendrawtransaction) rejects as too many arguments — a confusing dead end in a tutorial whose entire point is careful, security-conscious key handling.
Verified mechanics:
``` $ bash -c 'f=/tmp/t.txt; rm -f "$f"; echo a >> "$f"; echo b >> "$f"; foo(){ echo argc=$#; }; foo $(cat "$f")' argc=2 ```
Proposed fix: change both >> to > (2 characters, 2 lines, doc-only, zero code/consensus/P2P risk).