Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Console Foundations Environment and Redirection Environment Variables

geoffrey
geoffrey
28,736 Points

Can't set variable inside terminal

Hello, I have a little problem, during the Video, we see how to set a variable using the termina, as exemple MESSAGE = "hello world".

Oddly, with my linux Mint I can't set one, when I try to set the variable, I have the message MESSAGE : command not found.

Does anyone know why ?

1 Answer

Make sure that you haven't got any spaces in the command.

m094:~ $ MESSAGE = "Hello World"
-bash: MESSAGE: command not found
m094:~ $ MESSAGE="Hello World"
m094:~ $ echo $MESSAGE
Hello World
geoffrey
geoffrey
28,736 Points

Thank you that was stupid, but that was the answer ;)