Reputation: 167
getting a unexpected token error, no idea why tried pretty much everything.
bash version `3.2.57(1)-release`
Count=31;
for (( i=1 ; i<=$Count ; i++ ))
do
echo $i
done
'/script.sh: line 3: syntax error near unexpected token `
'/script.sh: line 3: `for (( i=1 ; i<=$Count ; i++ ))
Upvotes: 0
Views: 252
Reputation: 88829
Remove carriage returns from your script:
sed -i '' 's/\r$//' file.sh
Update:
sed -i '' $'s/\r//' file.sh
Upvotes: 1