How delete file from fortran code?

后端 未结 5 1447
有刺的猬
有刺的猬 2021-02-14 00:21

I need to delete a file from a Fortran code. I am on ubuntu 12.04, x86_64. I don\'t understand why the procedure described below does not work. Please

5条回答
  •  生来不讨喜
    2021-02-14 01:07

    So in your shell script, you don't specify a program in the first line. Try adding:

    #!/bin/bash
    

    as the very first line in del.sh. When bash starts it without that, it may be running the script with /bin/sh, not /bin/bash as you'd expect. (I'm not able to confirm right now, but I know I've had trouble in the past if I use bash-specific code but forget to put the shebang at the top.) When bash starts it with that line, it will see that it needs to be executed with bash instead. Since your code appears to show that calling it as a bash argument directly works, I'd say this should fix your problem. All the best.

提交回复
热议问题