P
prattm
We have a bunch of Perl scripts on our system, all of which use the
following header:
#!/bin/ksh -- # -*- perl -*-
eval 'exec ${PERL} $0 ${1+"$@"}'
if 0;
The idea is we maintain a common variable $PERL that points to our
latest version. This works fine and dandy, but one particular script
is running with setuid enabled (4110 permission) and has problems with
this header. It prints out the message:
Unrecognized character \x7F at /bin/ksh line 1.
The character 7F is the "delete" character, but I copied and pasted the
ksh header from another script that works, so I don't believe there is
any hidden character(s). We've also tried something like:
#!${PERL}
but that didn't work. The only way to get it to work is to hardcode the
path to perl executable, but this requires more maintenance when
upgrading our version of perl and we'd like to avoid it if possible.
Anyone have any ideas?
Thanks, Mike
following header:
#!/bin/ksh -- # -*- perl -*-
eval 'exec ${PERL} $0 ${1+"$@"}'
if 0;
The idea is we maintain a common variable $PERL that points to our
latest version. This works fine and dandy, but one particular script
is running with setuid enabled (4110 permission) and has problems with
this header. It prints out the message:
Unrecognized character \x7F at /bin/ksh line 1.
The character 7F is the "delete" character, but I copied and pasted the
ksh header from another script that works, so I don't believe there is
any hidden character(s). We've also tried something like:
#!${PERL}
but that didn't work. The only way to get it to work is to hardcode the
path to perl executable, but this requires more maintenance when
upgrading our version of perl and we'd like to avoid it if possible.
Anyone have any ideas?
Thanks, Mike