I have a bash script with name test.sh existed in the folder c:/test
Problem Source:
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 gdalinfo
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.
Search before posting
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
x <- "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)
but getting this error
Error in system(x, intern = TRUE, ignore.stdout = FALSE, ignore.stderr = FALSE, :
'bash' not found
Acknowledgements
highly thanks for resolving this problem. I am using Rstudio for the first.