I got it to run in cygwin, but....
In line one, there must not be spaces on either side of the equal sign.
In line 10, there appears to be a carriage return in the text if you copy and paste from the post above.
Vi just didn't seem to work at all, so I used Notepad++ to create the file, and then ran the following line of code to remove any carriage returns.
Code:
tr -d "\r" <inputfile >outputfile
You can set the line endings in Notepad++ to either DOS, Unix or Mac files.