Is it possible to parallelize the following code?
for word in $(cat FileNames.txt)
do
for i in {1..22}
do
Rscript assoc_test.R...........
done >> log.txt
done
I have been trying to parallelize it but have not been lucky so far. I have tried putting () around the Rscript assoc_test.R........... followed by & but it is not giving the results, and the log file turns out to be empty. Any suggestions/help would be appreciated. TIA.
followed by &, that should do the paralyzing. but you may need to wait a while for the Rscript finish their job