How do I get the script run with the sbatch command to run with the 23 individual run_prep_chem_$dd.sh (i.e. run_prep_chem_08.sh...run_prep_chem_30.sh)?  I am thinking since its in this for loop that it would run properly.  The code above the sbatch loops through 23 times but not the at sbatch script line#!/bin/bashRP_INPUT='$RP_INPUT'END='$END'for dd in {08..30}; doset dd=$ddprintf  %-3s %02d\n $dd $((10#$dd + 1))cat > /data/users/jwsmith/PREP-CHEM-SRC-1.4/bin/PREP_FILES/prep_chem_sources_$dd.inp << __EOF$RP_INPUT!---------------- grid_type of the grid output   grid_type= 'mercator',                        !'rams' = rams grid                        ! 'polar'  = polar sterog. grid output                        ! 'gg'  = gaussian grid output                        ! 'll'  = lat/lon grid output                        ! 'lambert'  = lambert grid output                        ! 'mercator' = mercator grid output!---------------- if the output data is for use in CATT-BRAMS model, provide at least one analysis file$END__EOFcp /data/users/jwsmith/PREP-CHEM-SRC-1.4/bin/PREP_FILES/prep_chem_sources_$dd.inp /data/users/jwsmith/PREP-CHEM-SRC-1.4/bin/prep_chem_sources.inpcat > /data/users/jwsmith/PREP-CHEM-SRC-1.4/bin/PREP_FILES/run_prep_chem_$dd.sh << BEOF#!/bin/bash -x#SBATCH --ntasks=1#SBATCH --mem-per-cpu=100000#SBATCH --cpus-per-task=1#SBATCH --time=00:30:00export I_MPI_JOB_STARTUP_TIMEOUT=10000source /etc/bashrcmodule load hdf5/1.8.12srun --distribution=block:block /data/users/jwsmith/PREP-CHEM-SRC-1.4/bin/prep_chem_sources_RADM_WRF_FIM.exeBEOFchmod 757 /data/users/jwsmith/PREP-CHEM-SRC-1.4/bin/PREP_FILES/run_prep_chem_$dd.shmv /data/users/jwsmith/PREP-CHEM-SRC-1.4/bin/PREP_FILES/run_prep_chem_$dd.sh  /data/users/jwsmith/PREP-CHEM-SRC-1.4/bin/run_prep_chem_$dd.shsbatch --dependency=afterok:$SLURM_JOB_ID /data/users/jwsmith/PREP-CHEM-SRC-1.4/bin/run_prep_chem_$dd.shcp /data/users/jwsmith/PREP-CHEM-SRC-1.4/bin/AEROSE_APRIL_CTL-T-2010-04-$dd-000000-g1-ab.bin /data/users/jwsmith/WRFV3/run/AEROSE_APRIL_CTL-T-2010-04-$dd-000000-g1-ab.bindone
passing variable through cat EOF command with for loop
bash;variable;loop device;for