solution:
If you receive an error message like this when trying to submit a job, it is because your batch script was edited in a Windows editor, not a unix editor. The Windows editors add line breaks that the unix interpreter doesn't recognize. You may receive an error such as:
sbatch: error: Batch script contains DOS line breaks (\r\n)
sbatch: error: instead of expected UNIX line breaks (\n).
Run the dos2unix command on your file to remove the Windows line breaks. For example:
dos2unix myBatchFile
Use the 'man' command to see all the options for the dos2unix command:
man dos2unix