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
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.