bash_job | R Documentation |
The conda setup is assumed to be in your ~/.bashrc If print_output == TRUE: the stdout/stderr will be printed instead of returned Else: the stdout/stderr with be returned by the function stderr/stdout is printed unless print_output==FALSE
bash_job(
cmd,
conda_env = NULL,
stdout = TRUE,
stderr = TRUE,
print_output = TRUE,
return_output = FALSE,
log_file = NULL,
verbose = TRUE,
wait = TRUE
)
cmd |
The bash command in a string format |
conda_env |
The conda env to use |
stdout |
If TRUE, print the stdout; if file path, write to file |
stderr |
If TRUE, print the stderr; if file path, write to file |
print_output |
Pretty printing of the output to the console? |
return_output |
Return the bash command output? |
verbose |
Write status messages? |
wait |
Wait for the process to finish? |
# simple
bash_job('ls -thlc')
# write stderr to log file
bash_job('ls -thlc', stderr='log.txt')
# use conda environment
bash_job('conda list', conda_env='base')
# return output
files = bash_job('find . -name \\"*ipynb\\"', return_output=TRUE, print_output=FALSE, verbose=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.