. . . b.sh rc=$? if [ $rc -ne 0 ] then echo "errors happend" fi . .
The $it_worked variable (and the if test) is just there to show the RESULT=0 - ypu'll need to work out how to decide if the ftp stuff worked
. . . # Let's assume it will fail ... RESULT=1 # Do some ftp stuff and determine if it worked # that needs to be up to you how to decide that # if it HAS worked then: if [ $it_worked -eq 0 ] then RESULT=0 fi exit $RESULT