I am trying to create a new bitcoin address and store it in a shell variable $ NEW_ADDRESS.
When I execute this command:
$ NEW_ADDRESS = $ (./ bitcoin-cli getnewaddress)
I receive the following errors:
Error: Unable to connect to server 127.0.0.1:8332 Make sure that the bitcoind server is running and that it is connecting to the correct RPC port. -bash: =: command not found
I have tried everything to fix the connection error, including writing the command:
./bitcoind -rpcport = 8332
Or even, changing the bitcoin configuration:
nano ~ / .bitcoin / bitcoin.conf
And writing these lines in the configuration:
rpcconnect = 127.0.0.1 rpcport = 8332;
But nothing works. Does anyone have an idea on how to solve and solve this?
Thanks in advance.