Run Shell Script
exec_shellRun scripts through bash, sh, fish, zsh, cmd, or PowerShell to execute shell syntax like pipes, redirects, &&, and globs on remote machines; set a timeout.
Instructions
Run one script through one shell (POSIX: bash/sh/fish/zsh -c; Windows: cmd /c, powershell -c). Only for shell syntax: pipes, redirects, &&, globs; otherwise exec. timeout in seconds, default 120, clamped to [1, 1800]. Invalid UTF-8 in stdout/stderr becomes U+FFFD.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Child working directory; omit to inherit. | |
| shell | No | POSIX: bash (default), sh, fish, zsh. Windows: cmd (default), powershell. | |
| script | Yes | Script passed to the shell, e.g. "du -sh /var/log | sort -h". | |
| timeout | No | Kill after this many seconds (1..1800, default 120). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | ||
| stderr | No | ||
| stdout | No | ||
| timeout | No | ||
| exit_code | No | ||
| duration_ms | No | ||
| duration_us | No |