Hi,
I have one shel script which returns some value and I am calling this shell script from a perl script which needs the out put/return value of shell script.
But I don't know how to collect the output/return value of the shell script. Can any one give some idea on it?
For example:
The shell script a.sh
if [ $1 == 0 ]
then
return 0
else
retunr 1
fi
The perl script myperl.pl
$output = exec 'a.sh', '$ctr';
print $output;
When I run the perl script, It doesn't print anything. Even I tried by replacing return with exit in the shell script but no luck.