Your line endings are Windows not Unix hence the issue...
Edit: Attached your script with the change in line endings...