DEV Community

Youngjoon Won
Youngjoon Won

Posted on • Updated on

bash examples

Rscript for cmd line arguments:

args<-commandArgs(TRUE)
args[1]
args[2]
Enter fullscreen mode Exit fullscreen mode

redirect stderr only

exec 2>std_err.txt
Enter fullscreen mode Exit fullscreen mode

[ref] https://www.baeldung.com/linux/use-command-line-arguments-in-bash-script

Top comments (0)