What does exec ${PERL-perl} -Sx $0 ${1+“$@”} mean in Shell script?
问题 I'm given a task to convert a shell script which contains Shell script, Perl code to Python. I managed to convert the Perl code to Python. But there is this shell script statement which I didn't understand. #! /usr/bin/sh exec ${PERL-perl} -Sx $0 ${1+"$@"} #! /opt/tools/perl5/bin/perl Some Perl code which I converted to Python What does this 2nd line means? I understood that $0 will be evaluated to the script name. And I'm assuming that ${PERL-perl} will evaluate to whatever Perl interpreter