CRAN_Status_Badge GitHub release Build Status AppVeyor Build Status codecov License

Run complex native scripts with a single command, similar to system commands.

## Overview The purpose of the scriptexec package is to enable quick and easy way to execute native scripts.

## Usage Simply load the library and invoke the execute

output <- scriptexec::execute("echo Current Directory:\ndir")
cat(sprintf("Exit Status: %s Output: %s\n", output$status, output$output))

# execute multiple commands as a script
output <- scriptexec::execute(c("cd", "echo User Home:", "dir"))
cat(sprintf("Exit Status: %s Output: %s\n", output$status, output$output))

# pass arguments to the script, later defined as ARG1, ARG2, ...
# and also pass some env vars
output <- execute("echo $ARG1 $ARG2 $MYENV", args = c("TEST1", "TEST2"), env = c("MYENV=TEST3"))
cat(sprintf("%s\n", output))

# non zero status code is returned in case of errors
output <- scriptexec::execute("exit 1")
cat(sprintf("Status: %s\n", output$status))
cat(sprintf("%s\n", output))

# do not wait for command to finish
execute('echo my really long task', wait = FALSE)

## Installation Install latest release from github (recommanded):


Install from CRAN (might be older, depending on CRAN team approval process)


Install current development version from github (might be unstable):


API Documentation

See full docs at: API Docs


See contributing guide

## Release History


## License Developed by Sagie Gur-Ari and licensed under the Apache 2 open source license.