Hi,
I have a cywin test script as below but errors,
#!/usr/bin/bash
while [ 1 != 0 ]
do
echo "123"
echo "456"
done
sh-3.2$ ./test.sh
./test.sh: line 7: syntax error: unexpected end of file
Please help...
Thanks!
Victor
Hi,
I have a cywin test script as below but errors,
#!/usr/bin/bash
while [ 1 != 0 ]
do
echo "123"
echo "456"
done
sh-3.2$ ./test.sh
./test.sh: line 7: syntax error: unexpected end of file
Please help...
Thanks!
Victor
Because you are editing on Windows and the line feeds are different on Windows and Unix you have to use dos2unix on that file before running it (dos2unix test.sh test.sh).
Hi,
Thank you all very much. It works!
Victor