Check for bad line end characters on the shebang line. A new line character (lf) is expected - a carriage return (cr) or cr/lf pair will cause grief of the nature you describe.
True laziness is hard work
| [reply] |
Yeah, checked that first. I think copying the file to the machine locally and running it without a hitch is also confirmation that that is not the problem.
| [reply] |
Maybe the NFS share is mounted as "noexec"? (I think that would produce the exact error you're getting, whereas some trailing junk char(s) in the shebang line would rather produce "... No such file or directory").
What does mount show for the share in question?
| [reply] [d/l] [select] |
Some ideas to try
- compare the hex dumps (od -x, hd, xxd, ...) of the first few lines. On the file server locally,
"copied" version (how did you copy it?) and accessed-via-nfs.
- implicit conversion might also be part of the mount options. What OS is the server, what is the client?
- strace -o log -e file SCRIPTNAME # what files are accessed?
- strace -o log -e file perl ./SCRIPTNAME # (use cat -vet when viewing the log)
cu
Peter
| [reply] |