#!/bin/bash PATH=$PATH:~/bin mkdir -p ~/STAR/STAR_results/ declare -a strat strat[1]="firstreuse"; strat[2]="secondreuse"; strat[3]="thirdreuse"; strat[4]="fourthreuse"; con=1; for i in `jot 100`; do echo "RUN #" $i for st in `jot 4`; do run="STAR -ex -f ALL -pol all -st ${strat[st]} -run $i"; echo $run; if [ $con -eq 1 ]; then con=0; $run & else con=1; $run fi done done