1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/runOSCommand.R
\name{runOSCommand}
\alias{runOSCommand}
\title{Run OS Commands on Local or Remote Machines}
\usage{
runOSCommand(
sys.cmd,
sys.args = character(0L),
stdin = "",
nodename = "localhost"
)
}
\arguments{
\item{sys.cmd}{[\code{character(1)}]\cr
Command to run.}
\item{sys.args}{[\code{character}]\cr
Arguments for \code{sys.cmd}.}
\item{stdin}{[\code{character(1)}]\cr
Argument passed to \code{\link[base]{system2}}.}
\item{nodename}{[\code{character(1)}]\cr
Name of the SSH node to run the command on. If set to \dQuote{localhost} (default), the command
is not piped through SSH.}
}
\value{
[\code{named list}] with \dQuote{sys.cmd}, \dQuote{sys.args}, \dQuote{exit.code} (integer), \dQuote{output} (character).
}
\description{
This is a helper function to run arbitrary OS commands on local or remote machines.
The interface is similar to \code{\link[base]{system2}}, but it always returns the exit status
\emph{and} the output.
}
\examples{
\dontrun{
runOSCommand("ls")
runOSCommand("ls", "-al")
runOSCommand("notfound")
}
}
\seealso{
Other ClusterFunctionsHelper:
\code{\link{cfBrewTemplate}()},
\code{\link{cfHandleUnknownSubmitError}()},
\code{\link{cfKillJob}()},
\code{\link{cfReadBrewTemplate}()},
\code{\link{makeClusterFunctions}()},
\code{\link{makeSubmitJobResult}()}
}
\concept{ClusterFunctionsHelper}
|