Bitcoin Core – Bitcoind Daemon: error when connecting to the server?

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
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 =
rpcport = 8332;

But nothing works. Does anyone have an idea on how to solve and solve this?

Thanks in advance.