. Bash_Profile Not Working

I'm trying to set AVARIABLE in my bash_profile:

echo export "AVARIABLE=example" >> ~/.bash_profile

then

source ~/.bash_profile

After that, AVARIABLE should be working, but...

bash: AVARIABLE: command not found

What in the hell could be causing this?

3

1 Answer

To reference an environment variable, you'd need to preface it with $ : $AVARIABLE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest