Hi folks, I have a one line shell script which looks like this:
R CMD BATCH --no-restore --no-save foo.R It executes the R program in foo.R and generates output called foo.Rout. Is there any way that I can force the output to come to stdout and stderr (instead of foo.Rout)? What I really want to do is the following (call it myscript): #!/bin/bash # do some work with bash and send the output # to stdout and stderr . . # now is the time to invoke my R script R CMD BATCH --no-restore --no-save myRscript.R exit I want the entire output to go to stdout and stderr, so that I can call it as: myscript > myscript.out 2>> myscript.out Rather than: myscript > myscript.out 2>> myscript.out cat myRscript.out >> myscript.out I would appreciate it if someone shows me how to do this. Regards, Tena Sakai tsa...@gallo.ucsf.edu [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.