I have a simple script that should work:
Code:
#!/bin/bash
STR = "Hello World!"
echo $str
Here is what I get when I run it (note that I did CHMOD 755 so it will run)
myname@myhost:~$ ./test
./test: Line 3: STR: command not found
Why is it doing this? It works if I put just
#!/bin/bash
echo "Hello World"
in the script. But it won't work using a variable.
I'm using Ubuntu Server 6.06.1.
This is odd.