Thank you. However, although this won't save the password to history, even with -stdin, the password gets displayed without any encryption on the screen. Is there a workaround to this?
Once you get the data you need, you can do
clear a bunch of times.
And one more thing. I noticed that the newest version of bitcoin core has support for multiple wallets. How do I set this up to have for example 5 different wallets but all using the same blockchain, so basically I do not want to download the entire blockchain again and store the blockchain 5 times, I only need the bitcoin-cli or the RPC to view / spend bitcoins from any wallet I want. Are there specific bitcoin-cli commands that are useful for selecting the wallet file I want to use?
Start Bitcoin Core with as many
-wallet=<wallet name> arguments (or add them to your bitcoin.conf file) as you want wallets to use. When you use bitcoin-cli with any wallet related command, you will need to use the
-rpcwallet=<walet name> argument to specify the wallet that you want to use. For example, you might do
$ bitcoind -daemon -wallet=wallet1 -wallet=wallet2
To start Bitcoin Core with two wallets, wallet1 and wallet2. If you want to do stuff with wallet1, you would do
$ bitcoin-cli -rpcwallet=wallet1 getwalletinfo