Skip to main content
Skip table of contents

Shell operations

RunCommand operation

  • Executes a shell command in a Unix environment using `/bin/sh`.

  • The environment user executes the command from their home directory.

  • The Delphix Continuous Data Engine captures and logs all command output.

  • In case of script failure, output is displayed in the Delphix Continuous Data UI and CLI for debugging.

  • Success criteria: The command must exit with an exit code of 0. Any other exit codes indicate a failure.

Examples of RunCommand operations

  • Direct command input:

if test -d "$remove_dir"; then
    rm -rf "$remove_dir" || exit 1
exit 0
  • Running existing scripts with executable permission:

/opt/app/oracle/product/ "$ARG_ENVIRONMENT_VARIABLE" "second argument in double quotes" 'third argument in single quotes'

RunBash operation

  • Executes a Bash command in a Unix environment using a bash binary provided by Delphix, unless it's a Linux environment, in which case it uses the system's native bash binary.

  • Follows the same execution and logging criteria as the `RunCommand` operation.

  • Success criteria: The Bash command must exit with an exit code of 0.

Example of RunBash operation

# Bashisms are allowed here!
if [[ -d "$remove_dir" ]]; then
    rm -rf "$remove_dir" || exit 1
exit 0

Running processes in the background

  • To detach a process from the Delphix Continuous Data Engine, use the `nohup` command and process backgrounding.

Redirect stdout and stderr to ensure the Delphix Continuous Data Engine does not block.

Examples of running background processes

Acceptable examples

nohup python 1>/dev/null 2>&1 & # both stdout and stderr redirected

Deniable examples

nohup python & # no redirection
nohup python 2>&1 & # only stderr is redirected
nohup python 1>/dev/null & # only stdout is redirected
nohup python 2>/dev/null & # only stdout is redirected
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.