I try executed some like this
#!/bin/bash
${postid=41930}
while ${postid} < 42000;
do
`node title.js ${postid}`
${postid} = ${postid} +1;
done
I have this error:
: command not found30
run.sh: line 8: syntax error: unexpected end of file
$ echo $SHELL
/bin/bash
$
From man sh
while *list*;do *list*;done
sh version 3.2
There are several places in your script needs to be fixed:
As chepner said you can’t assign value to an evaluated result like
${postid}, instead usepostiddirectly in the left hand side of your assignmentThere should be some invisible characters in your script. Try to run
dos2unix myscript.shor try hand typing the the following code into an new filehttps://gist.github.com/1651190