I want to add apache maven to my path variable so I put export commands in ~/.zshrc file
echo "executing ~/.zshrc"
#Setting-up maven
export $M2_HOME="/Users/adelinghanayem/Downloads/apache-maven-3.8.6"
PATH="$M2_HOME/bin:${PATH}"
export PATH
However, when I open a new terminal I get
/Users/adelinghanayem/.zshrc:5: /Users/adelinghanayem/Downloads/apache-maven-3.8.6 not found
$
from theexport
line:export M2_HOME=...
. You use$
to get the value of a variable, never when setting the variable or its properties.