From 07af202fa4ca3948ab743a486945dc16c5930ead Mon Sep 17 00:00:00 2001 From: Shannon Appelcline Date: Fri, 19 Jun 2020 10:48:23 -1000 Subject: [PATCH] updated with new examples just in case --- 03_3__Interlude_Using_Command-Line_Variables.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/03_3__Interlude_Using_Command-Line_Variables.md b/03_3__Interlude_Using_Command-Line_Variables.md index 18b069a..dad8382 100644 --- a/03_3__Interlude_Using_Command-Line_Variables.md +++ b/03_3__Interlude_Using_Command-Line_Variables.md @@ -20,15 +20,17 @@ These commands clear the NEW_ADDRESS_1 variable, just to be sure, then fill it w You can then use your shell's `echo` command to look at your (new) address: ``` $ echo $NEW_ADDRESS_1 -n4cqjJE6fqcmeWpftygwPoKMMDva6BpyHf +mi25UrzHnvn3bpEfFCNqJhPWJn5b77a5NE ``` Because you have your address in a variable, you can now easily sign a message for that address, without worrying about mistyping the address. You'll of course save that signature into a variable too! ``` $ NEW_SIG_1=$(bitcoin-cli signmessage $NEW_ADDRESS_1 "Hello, World") +$ echo $NEW_SIG_1 +IPYIzgj+Rg4bxDwCyoPiFiNNcxWHYxgVcklhmN8aB2XRRJqV731Xu9XkfZ6oxj+QGCRmTe80X81EpXtmGUpXOM4= ``` The rest of this tutorial will use this style of saving information to variables when it's practical. -_When is it not practical to use command-line variables?_ Command-line variables aren't practical if you need to use the information somewhere other than on the command line. For example, saving your signature may not actually be useful if you're just going to have to send it to someone else in an email. In addition, some future commands will output JSON objects instead of simple information, and variables can't be used to capture that information ... at least not without a _little_ more work. +> :book: ***When is it not practical to use command-line variables?*** Command-line variables aren't practical if you need to use the information somewhere other than on the command line. For example, saving your signature may not actually be useful if you're just going to have to send it to someone else in an email. In addition, some future commands will output JSON objects instead of simple information, and variables can't be used to capture that information ... at least not without a _little_ more work. ## Summary: Using Command-Line Variables