powered by
This is a helper function to run arbitrary OS commands on local or remote machines. The interface is similar to system2, but it always returns the exit status and the output.
system2
runOSCommand( sys.cmd, sys.args = character(0L), stdin = "", nodename = "localhost" )
[named list] with “sys.cmd”, “sys.args”, “exit.code” (integer), “output” (character).
named list
[character(1)] Command to run.
character(1)
[character] Arguments for sys.cmd.
character
sys.cmd
[character(1)] Argument passed to system2.
[character(1)] Name of the SSH node to run the command on. If set to “localhost” (default), the command is not piped through SSH.
Other ClusterFunctionsHelper: cfBrewTemplate(), cfHandleUnknownSubmitError(), cfKillJob(), cfReadBrewTemplate(), makeClusterFunctions(), makeSubmitJobResult()
cfBrewTemplate()
cfHandleUnknownSubmitError()
cfKillJob()
cfReadBrewTemplate()
makeClusterFunctions()
makeSubmitJobResult()
if (FALSE) { runOSCommand("ls") runOSCommand("ls", "-al") runOSCommand("notfound") }
Run the code above in your browser using DataLab