Win10 remote connection submits error by using cluster: Batch: error: batch script contains DOS line breaks (\R\n) sbatch: error

Description:

The notebook of win10 system is remotely connected to the win10 workstation of the office, and then the win10 workstation is used to submit tasks to the cluster server. At this time, you can edit bash directly in the Linux environment of the cluster server The SH file cannot be run normally. If you use VIM to open the file and edit it again, the error will be prompted as follows:

batch: error: Batch script contains DOS line breaks (\r\n)
sbatch: error: instead of expected UNIX line breaks (\n)

In this case, use vscode to bash The SH file can be changed from CRLF to LF to solve the problem.

Read More: