Ubuntu - executable file - variable assignment throwing error on script run
Posted
by
newcoder
on Server Fault
See other posts from Server Fault
or by newcoder
Published on 2012-07-10T20:41:29Z
Indexed on
2012/07/10
21:17 UTC
Read the original article
Hit count: 150
I am trying to run a small script - test - on ubuntu box.
It is as follows:
var1 = bash
var2 = /home/test/directory
...
...
<some more variable assignments and then program operations here>
...
...
Now every time I run it, then it throws errors:
root@localhost#/opt/test
/opt/test: line 1: var1: command not found
/opt/test: line 3: var2: command not found
...
...
more similar errors
...
Can someone help me understand what is wrong in this script?
Many thanks.
© Server Fault or respective owner