I bet most kernels don't support having a #! line in a script that points to another script that has another #! that points to another thing. You see how that could quickly get rather convoluted.
Unfortunately, when I try to do that myself to test it, rather than a nice clear error message telling me not to be such a clever prick, I get errors that look like my Perl script is being interpreted by something other than perl but I am, so far, at a loss as to what that other thing is.
When I ran "strace script" to figure out what other thing is trying to interpret my Perl code, I got "exec: Exec format error" from strace.
So, one answer for the OP is to write this simple wrapper in a compiled language so that the wrapper doesn't need a #! of its own.
- tye
In reply to Re^2: wrapper script to conditionally exec different perls? (#!->#!->#!->...)
by tye
in thread wrapper script to conditionally exec different perls?
by stackspace
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |