If I write a Linux HPC submission script directly in notepad, it works fine. However, if I write the script to file using My.Computer.FileSystem.WriteAllText then I get the error:
sbatch: error: This does not look like a batch script. The first
sbatch: error: line must start with #! followed by the path to an interpreter.
sbatch: error: For instance: #!/bin/sh
I have compared a submission script written in notepad to one written using WriteAllText with Notepad++ and can’t see a difference but the one written with WriteAllText results in the error and the one written in notepad does not. Here is the errant version with all symbols shown in Notepad++:
And here is the one written in Notepad that works:
I also checked and they are both UTF-8 encoded.
I can’t figure out what the difference in the two is. How can I get this to work?