#!/bin/bash # written by Alan if [[ $# -ne 2 ]] then echo 'This script requires two arguments being the first and last job numbers to resume listed by squeue.' exit 1 fi for (( job_number=$1; job_number<=$2; job_number++ )) do echo "resuming $job_number" eval sudo scontrol resume $job_number done