I think strace wouldn't help here (actually this is one of the very few cases where it wouldn't :), as it would only show something like (in case the shebang line is incorrect, that is)
execve("./SCRIPTNAME", ["./SCRIPTNAME"], [/* 31 vars */]) = -1 ENOENT +(No such file or directory)
The actual shebang resolution happens directly in the kernel, which is invisible to strace-ing.
Note that the "bad interpreter" info is added by bash (as a hint to the user) in case the file permissions of the script itself etc. are OK, but the execve still does return with an error.
In reply to Re^4: bad interpretor error when running scripts off an NFS share
by almut
in thread bad interpretor error when running scripts off an NFS share
by GaijinPunch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |