Here is a simple example of bash script which executes R code within. Create a file called R.sh with the following content:
#!/bin/bash R –no-save rfunction(2,5) [1] 7 >
Filed under: Bash, Scripting | Comments Off