#!/usr/bin/sh
N=1
while test "$N" -le "10"
do
echo "Number $N"
N=$[N+1]
done
in test.sh.
Then ran it like :
./test.sh
To get :
./test.sh: line 7: syntax error: unexpected end of file
Issue was that Windows/Dos files don't work well
as shell scripts, due to difference in new line formatting.
So, the solution is , dos2Unix convert command :
d2u test.sh
And, that's all.
Run happily ever after.
No comments:
Post a Comment