SH: shell command (execute a command in the underlying shell)
Syntax
sh(cmd, [timeout], [lines])Arguments
- cmd: Command to execute
- timeout: Refresh timeout in minutes or fractions (default 1 minute)
- lines: Max lines to output (default 5)
Examples
Formula | Description |
---|---|
$sh("ps | grep '^u' | wc -l")$ | Number of user processes |
$sh("cat /proc/cpuinfo | grep Hardware | sed 's/.*: //'")$ | Current CPU technology |