title: Passing arguments from a call to a bash script to an Rscript
body: <p>I have a bash script that does some things and then calls Rscript. Here a simple example to illustrate:</p>
  
  <p><strong>test.sh:</strong></p>
  
  <pre><code>Rscript test.r
  </code></pre>
  
  <p><strong>test.r:</strong></p>
  
  <pre><code>args &lt;- commandArgs()
  print(args)
  </code></pre>
  
  <p>How can I use <code>./test.sh hello</code> on the command line result in R printing hello?</p>