I don't know how to use variables for further executing in a script.
I tried the following:
#!/bin/bash
NUM = 0
echo Number $NUM > text.txt
but I get the following error:
num.sh: 3: num.sh: NUM: not found
I don't know how to use variables for further executing in a script. I tried the following:
but I get the following error:
|
||||
|
There must not be any whitespace around Remove the whitespaces:
Also if you don't have any good reason, don't use all uppercases for a user defined shell variable name as there is chance that this could conflict with any environment variable. Better do:
|
|||||
|
Don't use spaces in line |
|||
|
You may need to remove the space after
|
|||
|