Reputation: 81
I'm building a script that uses a while loop like the following:
$sync=0
while [ $sync -eq 0 ];
do
body of the loop where $sync get changed sevaral times
done
The probleme is when I execute the script it gives me an error saying:
enter code hereline 53: 0=0: command not found
Please help me, thanks in advance
Upvotes: 1
Views: 234
Reputation: 247012
Change $sync=0
to sync=0
. bash is not perl, so don't use the $
when assigning to a variable.
See http://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameters
PS, the error message is useful: what is on line 53 in your script?
Upvotes: 2