Hi,
I'm assuming you're on a linux machine since you're using shell scripts, and in my experience the easiest way is using the system() function.
For example:
system("date")
will output the date to the console. If you like to capture the output text to an R variable:
var = system("date", intern = T)
So if you like to run a script with some arguments can you just do:
arg1 = 10
command = sprintf("path/to/script/script.sh -x %i", arg1)
system(command)
Hope this helps,
PJ