return - UDM Command

Syntax

return [return-value]

Description

The return command, generally used in conjunction with an if statement, performs the following:

  1. Stops executing the current script immediately.
  2. Returns execution to the calling script immediately after the call command used to invoke the current script.

If the current script was called by invoking UDM with the SCRIPT_FILE option, UDM will exit.

Optionally, the return command can specify a numeric return value. UDM will set the _rc variable (UDM's return code) to this value.

Parameters

Parameter

Description

return-value

Return value to which the _rc variable is set, specifying when to return.

Examples

To return from the currently executing script using the current value for _rc:

return


To return from the currently executing script using a specific numeric return value to set _rc to:

return 4