Skip to main content

builtin_system

Function builtin_system 

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

Execute a shell command.

When intern = FALSE (default), the command runs and its exit code is returned as an integer. When intern = TRUE, the command’s stdout is captured and returned as a character vector (one element per line).

@param command character scalar: the shell command to run @param intern logical: if TRUE, capture stdout as character vector (default FALSE) @return integer scalar (exit code) when intern=FALSE, or character vector when intern=TRUE