This is a test version of Biostars. For the public version, visit https://www.biostars.org.
"command not found" - very newbie question

I am trying to learn the very basics of running bash scripts from my Mac OSX Terminal. I created a script ("Test.sh") containing the following:

 #!/bin/bash

GREETING = "Hello"

...and then try to execute it from the Terminal ("bash Test.sh"). However, I get the following message:

"Test.sh: line 2: GREETING: command not found"

No matter what my script contains, I still get "command not found".

I'm sure it's extremely basic but I can't figure out what's wrong or where to start thinking about this. Any ideas?

software error

Thank you, it worked! And sorry for posting this in the wrong place.

Cheers!

Hello Liflock!

We believe that this post does not fit the main topic of this site.

Not a bioinformatics question.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

1 answer

Remove the space around =, it's causing a syntax error.

Also, this isn't a bioinformatics question.

Log in to answer this question.