Update 3_3__Using_Command-Line_Variables.md

This commit is contained in:
Shannon Appelcline 2017-03-28 10:35:06 -07:00 committed by GitHub
parent 94a3b3c869
commit 396ee26bf7

View File

@ -21,12 +21,10 @@ $ echo $NEW_ADDRESS_1
n4cqjJE6fqcmeWpftygwPoKMMDva6BpyHf n4cqjJE6fqcmeWpftygwPoKMMDva6BpyHf
``` ```
You could similarly save a signature like this: Because you have your address in a variable, you can now easily sign a message for that address, without worrying about misstyping the address. You'll of course save that signature into a variable too!
``` ```
$ NEW_SIG_1=$(bitcoin-cli signmessage $NEW_ADDRESS_1 "Hello, World") $ NEW_SIG_1=$(bitcoin-cli signmessage $NEW_ADDRESS_1 "Hello, World")
``` ```
Just put _everything_ inside the parentheses!
The rest of this tutorial will use this style of saving information to variables when it's practical. The rest of this tutorial will use this style of saving information to variables when it's practical.
(When is it not practical? Saving your signature may not actually be practical if you're just going to have to send it to someone else, not use it yourself. In addition, in the future, some commands will output JSON objects instead of just a line of information, and variables can't be used to capture that information ... though there are alternatives.) _When is it not practical? Saving your signature may not actually be practical if you're just going to have to send it to someone else, not use it yourself. In addition, in the future, some commands will output JSON objects instead of just a line of information, and variables can't be used to capture that information ... though there are alternatives._