On my MacBook with MacOS Catalina I try to export multiple environment variables by setting them in the ~/.bash_profile
file. I proceed as follows:
touch ~/.bash_profile
open ~/.bash_profile
Then the file ~/.bash_profile
opens in my text editor and I add multiple environment variables:
export VAR1="some_value"
export VAR2="some_value"
export VAR3="some_value"
export VAR4="some_value"
export VAR5="some_value"
Then I save the file and apply the changes as follows:
source ~/.bash_profile
Now I should be able to access the values of the newly defined variables. If I type echo ${VAR1}
or echo ${VAR2}
I get the correct value some_value
, but if I type echo ${VAR3}
I get export$lue
, i.e. the first seven characters are replaced by export$
.
Any advice?