return [ expression]
If the return keyword is encountered in the main part of a script, execution of the script terminates at that point, and the value returned from any following expression is saved. This return value is available as a return from the Exec function, if that command was used to execute the script. In general, the return value is ignored.
If used in a function (see 18.10), the function returns immediately with the value of the expression, if given.