title: how to run bash script from R
body: <p>I have a bash script with name <strong>test.sh</strong> existed in the folder <strong>c:/test</strong></p>
  
  <p><strong>Problem Source:</strong></p>
  
  <p>The mainly reason to run bash in r, actually I have .nc4 files download with r and i would like to get its bandinfo by using <code>gdalinfo</code> in r which was more easy work in bash than in r.  That why I have prepared another script in bash which can read these .nc4 files. </p>
  
  <p><strong>Search before posting</strong></p>
  
  <p>I search a function in r `system' but after setting path to the folder where my bash file exit i am trying this command in R</p>
  
  <pre><code>x &lt;- "bash test.sh" #my bash file which i want to run in r
  system(x, intern = TRUE,ignore.stdout = FALSE, ignore.stderr = FALSE, wait = TRUE, input = NULL, show.output.on.console = TRUE,minimized = FALSE, invisible = TRUE)
  </code></pre>
  
  <p>but getting this error</p>
  
  <pre><code>Error in system(x, intern = TRUE, ignore.stdout = FALSE, ignore.stderr = FALSE,  : 
    'bash' not found
  </code></pre>
  
  <p><strong>Acknowledgements</strong></p>
  
  <p>highly thanks for resolving this problem. I am using Rstudio for the first.</p>