Get Job id and put them into a bash command
问题 Hello for a projet I need to execute a bash file only when all previous run have been finished so I use : sbatch -d afterok:$JobID1:$JobID2:$JobIDN final.sh in Order to run the JobIDN I do for job in Job*.sh ; do sbatch $job; done Then it prints all the jobIDs I just wondered if someone haave a command in order to grab these IDs and put them directly to the command : sbatch -d afterok:$JobID1:$JobID2:$JobIDN final.sh exemple for job in Job*.sh ; do sbatch $job; done 1 2 3 sbatch -d afterok:$1