The assignment RET1in your shell script runs the Perl command and captures its standard output. To keep your Perl program moving forward, change the conditional expression at the end to
if ($SETFLAG==1)
{
print $SETFLAG;
}
Startup is done using
1
Another way is to use the exit status of the Perl program. C shell.shcontaining
#! /usr/bin/ksh
RET1=$(${PERL_PATH} missing_months_wrap.pl)
echo $?
and changing the last condition in missing_months_wrap.plto
if ($SETFLAG==1)
{
exit $SETFLAG;
}
you get the same result:
$ PERL_PATH=/usr/bin/perl ./shell.sh
1