earthlab / rslurm

Submit R code to a Slurm cluster
https://www.earthdatascience.org/rslurm/
50 stars 32 forks source link

Convert DOS line breaks to Unix #85

Open qdread opened 8 months ago

qdread commented 8 months ago

In #84 a user creates his job locally on a Windows machine then copies the scripts to HPC and submits the job there. I think this is a common enough workflow. It raises the issue that if you do this, the .sh scripts will not have Unix line breaks and can't be executed. It might be good to modify slurm_apply and related functions to run something like sed -i.bak "s/\r$//" submit.sh?

mhesselbarth commented 7 months ago

A quick follow up on this. I just saw that the slurm_run.R script has the same DOS line breaks. It doesn't seem to be am obvious problem, but might cause issues down the line?