in reply to Re: wrapper script to conditionally exec different perls?
in thread wrapper script to conditionally exec different perls?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: wrapper script to conditionally exec different perls? (#!->#!->#!->...)
by stackspace (Initiate) on Feb 15, 2012 at 22:41 UTC | |
|
Re^3: wrapper script to conditionally exec different perls? (#!->#!->#!->...)
by Eliya (Vicar) on Feb 15, 2012 at 20:22 UTC |