mirror of
				https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
				synced 2025-10-31 02:17:24 +00:00 
			
		
		
		
	Update 3_3_Setting_Up_Your_Wallet.md
This commit is contained in:
		
							parent
							
								
									5b14939f54
								
							
						
					
					
						commit
						5756784083
					
				| @ -15,20 +15,7 @@ n4cqjJE6fqcmeWpftygwPoKMMDva6BpyHf | |||||||
| ``` | ``` | ||||||
| However, this isn't best practice. Though your address _is_ saved away in your wallet for your future use, you could easily make a mistake if you were retyping or cutting it somewhere else. And then you're telling people to send money to somewhere else (or to nowhere!). So instead we suggest a best practice, which is meant to minimize address mistakes. | However, this isn't best practice. Though your address _is_ saved away in your wallet for your future use, you could easily make a mistake if you were retyping or cutting it somewhere else. And then you're telling people to send money to somewhere else (or to nowhere!). So instead we suggest a best practice, which is meant to minimize address mistakes. | ||||||
| 
 | 
 | ||||||
| [[move]] |  | ||||||
| ## Best Practices: Use Variables to Capture Addresses |  | ||||||
| 
 | 
 | ||||||
| Instead, use your shell's built-in variables to capture your address. |  | ||||||
| ``` |  | ||||||
| $ unset NEW_ADDRESS_1 |  | ||||||
| $ NEW_ADDRESS_1=$(bitcoin-cli getnewaddress) |  | ||||||
| ``` |  | ||||||
| These commands clear the NEW_ADDRESS_1 variable, then fill it with the results of the `bitcoin-cli getnewaddress` command. |  | ||||||
| 
 |  | ||||||
| You can then use your shell's `echo` command to look at your (new) address: |  | ||||||
| ``` |  | ||||||
| $ echo $NEW_ADDRESS_1 |  | ||||||
| n4cqjJE6fqcmeWpftygwPoKMMDva6BpyHf |  | ||||||
| ``` | ``` | ||||||
| Note that this address begins with an "n" (or sometimes an "m"). This signifies that this is a testnet address.  | Note that this address begins with an "n" (or sometimes an "m"). This signifies that this is a testnet address.  | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user