I have multiple R scripts to read (up to 3 i.e. tr1.R, tr2.R, tr3.R).
The bash script for reading a single script is given below
The bash script for reading a single script is given below
#!/bin/bash
#PBS -l nodes=1:ppn=10,walltime=00:05:00
#PBS -M
#PBS -m e
module load R/4.0
Rscript ~/tr1.R
I tried the following as suggested by @cas
#!/bin/bash
#PBS -l nodes=1:ppn=10,walltime=00:05:00
#PBS -M
#PBS -m e
module load R/4.0
**Rscript ~/tr"$i".R**
Further, the job is submitted using
for i in {1..3} ; do
qsub -o "default.$i.out" -e "errorfile$i" -v i script.sh
done
This couldnot read **Rscript ~/tr"$i".R**.
Asked by b_takhel
(21 rep)
May 23, 2021, 09:20 PM
Last activity: Jun 1, 2021, 06:04 AM
Last activity: Jun 1, 2021, 06:04 AM