I have many folders that contain .sh files(as shown below). I need to run each one of them on the cluster. I need help on how to put the following sbatch command into a loop.
cd file1
sbatch run_min.sh
sbatch run_eqbr.sh
sbatch run_prod.sh
cd ..
cd file2
sbatch run_min.sh
sbatch run_eqbr.sh
sbatch run_prod.sh
Folder structure
folder1
run_min.sh
run_eqbr.sh
run_prod.sh
folder2
run_min.sh
run_eqbr.sh
run_prod.sh
folder3
run_min.sh
run_eqbr.sh
run_prod.sh
folder4
run_min.sh
run_eqbr.sh
run_prod.sh
This worked.
for dir in */;
do sbatch run_min.sh;
sbatch run_eqbr.sh
sbatch run_prod.sh ; done