Changing wallet password using double quotation marks turn out to be mysterious (Qtum Core) I installed Qtum core in my Ubuntu 16.04 server and generated my wallet, and encrypted it.

For the test purpose, I changed the password using the command like below.

I typed below command to change my password.


  ./qtum-cli walletpassphrasechange "oldpassphrase" "newpassphrase"


Let's say my oldpassphrase is test and my new passphrase is test"

Notice that I type the double quotation mark right after the word test


  ./qtum-cli walletpassphrasechange "test" "test""


This returns below line that asks me to close the double quotation mark.


  >


So I typed " to close it.

Surprisingly, the command line has passed!

I thought the new password would be test" or test""

But they both do not work.

Can anyone guess what the new password might be?
This is really a Bash question, but I'll bite.

Bash (or any UNIX shell) will treat " symbols as begin and end of a literal. Inside "", spaces and special characters inside that would otherwise have a special meaning are permitted.

One of the permitted special characters inside is the newline. That's exactly what's happening here. Your "test"" plus " on the next line is seen as "test" plus a newline between quotation marks. As a result, your new password is test plus a newline character.

If you would want test" as your password, one way would be to use single quotes instead of double quotes. One of the characters permitted inside single quotes is... the double quote character.

So you could use

walletpassphrasechange 'test' 'test"'