#!/bin/bash
aa () {
typeset i
i=$1
if [ $i -ge 5 ]; then
exit
fi
echo aa call bb
bb $(( i+=1 ))
}
bb () {
typeset i
i=$1
if [ $i -ge 5 ]; then
exit
fi
echo bb call aa
aa $(( i+=1 ))
}
aa 1
#!/bin/bash
aa () {
typeset i
i=$1
if [ $i -ge 5 ]; then
exit
fi
echo aa call bb
bb $(( i+=1 ))
}
bb () {
typeset i
i=$1
if [ $i -ge 5 ]; then
exit
fi
echo bb call aa
aa $(( i+=1 ))
}
aa 1