Skip to content
Snippets Groups Projects
Commit 566bdb23 authored by Lars Jitschin's avatar Lars Jitschin
Browse files

updated bash code style in slurm_examples.md

parent 56ea1524
No related branches found
No related tags found
2 merge requests!808Automated merge from preview to main,!784Resolve #456
......@@ -394,16 +394,16 @@ In the following we provide two examples for scripts that submit chain jobs.
dependency=""
arraylength=${#job_names[@]}
for (( i=0; i<${arraylength}; i++ )) ; do
job_nr=`expr $i + 1`
for (( i=0; i<arraylength; i++ )) ; do
job_nr=$((i + 1))
echo "Job ${job_nr}/${arraylength}: ${job_names[$i]}"
if [ -n "${dependency}" ] ; then
if [ -n "${dependency}" ] ; then
echo "Dependency: after job ${dependency}"
dependency="--dependency=afterany:${dependency}"
fi
fi
job="sbatch ${dependency} ${job_names[$i]}"
out=`${job}`
dependency=`echo ${out} | awk '{print $4}'`
out=$(${job})
dependency=$(echo "${out}" | awk '{print $4}')
done
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment