Cygwin Syntax Trouble
- by mkrouse
I'm on windows 7 using Cygwin.
My script and text file are located in the same directory.
#!/bin/bash
while read name; do
echo "Name read from file - $name"
done < /home/Matt/servers.txt
I get this error and I don't know why because this is correct while loop syntax..?
u0146121@U0146121-TPD-A ~/Matt
$ ./script.sh
./script.sh: line 4: syntax error near unexpected token `done'
./script.sh: line 4: `done < /home/Matt/servers.txt'
Can anybody tell me what I'm doing wrong? I think it's because I'm on windows and using Cygwin.