Learn R Programming

blit (version 0.1.0)

exec: Invoke a System Command

Description

Invoke a System Command

Usage

exec(cmd, ...)

Value

A command object.

Arguments

cmd

Command to be invoked, as a character string.

...

<dynamic dots> Additional arguments passed to cmd command. Empty arguments are automatically trimmed. If a single argument, such as a file path, contains spaces, it must be quoted, for example using shQuote.

See Also

  • cmd_wd()/cmd_envvar()/cmd_envpath()

  • cmd_run()/cmd_background()/cmd_help()

Examples

Run this code
cmd_run(exec("echo", "$PATH"))

Run the code above in your browser using DataLab