Windows and Unix use different characters to indicate a “newline” or “end of line”. If you have uploaded your script from a Windows machine, it may have the Windows “newline” characters. These need to be replaced by the Unix “newline”characters. To do this, you can run the “dos2unix” command on your script:
This will strip out all of the Windows newlines and replace them with the Unix newlines. This command is installed on all compute nodes, but not the login nodes, so you’ll need to qrsh to a compute node before running it.