call b.sh from a.sh, and continue to a.sh after use exit 0 from b.sh

Hi,

I have two sh file. a.sh and b.sh b.sh is command and used by other sh's. I want to add below line to b.sh. When it is done with b.sh I want to continue to process a.sh. But when I use exit 0 in b.sh it is exit from b.sh and a.sh

How can I make it to continue to process?

a.sh

#!/bin/ksh
 
. b.sh
 
echo "still running"
 
 
b.sh 
#!/bin/ksh
if [ xx = xx ]; then
{
   echo "msg"
   exit 0
 }
fi

[COLOR=black][FONT=Verdana]Regards

Try return instead of exit in b.sh

it worked. Thanks