I have two file sh. a.sh b.sh
In a.sh I have something like this:
a=10
sh b.sh $a
echo $a
In b.sh I have
a=$1
if (( 1 > 2 ));
then
a=20
else
a=$1
fi
I want to assign $a in a.sh after check condition in b.sh.
I try with export but without lucky.
b.shfrom withina.sh? Like,. ./b.sh $ainstead ofsh b.sh $a