all kinds of errors will popup if you write this (or any) script on windows. i was almost giving up when i realised i had written it on notepad and saved on the linux box over samba. use dostounix <scriptfile> to fix the format.
RobbyC The reason for this error is that the control character sequence used by DOS (Windows, \r\n) is different from the sequnce used by UNIX (*NIX, \n)