tools.ShellExec
Execute a shell command and outputs stdout
and stderr
.
Options
- cwd {string}: current working directory of the child process.
- env {object}: environment key-value pairs.
- encoding {string}: (default: 'utf8').
- shell {string}: shell to execute the command with (Default: '/bin/sh' on UNIX, 'cmd.exe' on Windows, The shell should understand the -c switch on UNIX or /s /c on Windows. On Windows, command line parsing should be compatible with cmd.exe.).
- timeout {number}: (default: 0).
- maxBuffer {number}: largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed (Default: 200*1024).
- killSignal {string}: (default: 'SIGTERM').
- uid {number}: sets the user identity of the process.
- gid {number}: sets the group identity of the process.
Inputs
- command {string}: the command to run, with space-separated arguments.
Outputs
- command {string}: a copy of the corresponding input.
Examples