HI ,
Is there any way to return a value of variable from shell to perl script.
Code:
===
Perl file
my $diff1=system("sh diff.sh");
my $diff2=system("sh diff1.sh");
I need exit status of below commands
i.e 0 and 1 respectively.
Since in both the cases diff is working so system command will return 0 .
diff1.sh
-------
a=diff aaa ccc
diff.sh
--------
b=diff aaa bbb
122 $> cat aaa
1hi hello
123 $> cat bbb
hi hello
125 $ cat ccc
1hi hello
120 $ diff aaa ccc
echo $?
0
diff aaa bbb
1c1
< 1hi hello
---
> hi hello
Exit 1
echo $?
1