Your getting this set of errors because you have an extra "Windows" character at the end of the line.
Usual Linux files normally end their lines with one char \n
- meaning something like "next line" - whereas "Windows" files' lines end with the two chars \r\n
- "next line - carriage return"... Don't ask me what the carriage is on a laptop those days.
This is a common issue, all of programmers will face in their life. See how Difference between \n and \r? ranks for example!
There is a Linux
utility to do the conversion between OS for you:
dos2unix myscript.windows myscript.linux