Skip to main content

builtin_system2

Function builtin_system2 

Source
fn builtin_system2(
    args: &[RValue],
    named: &[(String, RValue)],
    context: &BuiltinContext<'_>,
) -> Result<RValue, RError>
Expand description

Execute a command with arguments, optionally capturing stdout/stderr.

@param command character scalar: the program to run @param args character vector: command-line arguments (default: none) @param stdout logical or character: TRUE = capture to character vector, FALSE = discard, “” = inherit (default), or a file path to redirect to @param stderr logical or character: TRUE = capture, FALSE = discard, “” = inherit (default), or a file path to redirect to @return integer scalar (exit code) when stdout is not captured, or character vector of captured output with “status” attribute set to exit code