Hi list,

I would like the run a R script in a batch mode.  So i use a command line like this :

for i in *.xlsx; do cat $i | echo 'argv <- $i; source("path/to/script.R")' | R --vanilla --slave ; done

which gives the error " Erreur : '$' inattendu(e) dans "argv <- $" "

i've also tried  :

for i in *.xlsx; do cat $i | R CMD BATCH --args $i "path/to/script.R" ; done

which gives me nothing.  

The idea is to read dozens of similar excel files in a folder with gdata package and to write their content in another single file.  
My script works fine with a read.xls when i specify a file name, but and here I get the name of the file with :
argv <- commandArgs(TRUE)

This is all I've been able to find from various docs and I'm not familiar with the command line.  
What am I doing wrong ?
Could anyone help me ?

Didier
	[[alternative HTML version deleted]]

