remote.execute.cmd: Execute command remotely

Description Usage Arguments Details Value Author(s) Examples

View source: R/Utils.R

Description

Execute command remotely

Usage

1

Arguments

host

host structure to execute command on

args

a character vector of arguments to command.

stderr

should stderr be returned as well.

command

the system command to be invoked, as a character string.

Details

Executes the given command on the remote host using ssh. If the user is set the system will login as the given user. If the host given is the local machine it will execute the command locally without ssh.

Value

the captured output of the command (both stdout and stderr)

Author(s)

Rob Kooper

Examples

1
2
3
4
5
## Not run: 
#' host <- list(name='cc-login.campuscluster.illinois.edu', user='hamzed', tunnel='~/tunnel')
  print(remote.execute.cmd(host, 'ls', c('-l', '/'), stderr=TRUE))

## End(Not run)

AgronomicForecastingLab/pSIMSSiteMaker documentation built on March 6, 2021, 2:27 p.m.