Can anyone tell me if it's possible to write a script that will repeat the same job several times but give the output a slightly different name each time (i.e. change or add a number at the end of the output file)? Here is the script I use to run a single job:
#!/bin/bash
#PBS -N job0
#PBS -l select=1:ncpus=1:mem=15gb
#PBS -k oe
#PBS -q workq
#PBS -l walltime=72:00:00
#PBS -M user@gmail.com
#PBS -m ea
source /etc/profile.d/modules.sh
module purge
module add gcc/4.5.1
cd $PBS_O_WORKDIR
/scratch/user/program -iprogram_0.u -oprogram_0.out
I know I can write separate bash files for each job but I want to know if I can write a script that will replicate jobs AND give the output a new name, without having to specify that all in a another bash file. Thanks.