From 566bdb23b339982b514ff2a46854d30b33fcc22f Mon Sep 17 00:00:00 2001
From: Lars Jitschin <lars.jitschin@tu-dresden.de>
Date: Mon, 27 Feb 2023 15:23:34 +0100
Subject: [PATCH] updated bash code style in slurm_examples.md

---
 .../docs/jobs_and_resources/slurm_examples.md        | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc.zih.tu-dresden.de/docs/jobs_and_resources/slurm_examples.md b/doc.zih.tu-dresden.de/docs/jobs_and_resources/slurm_examples.md
index b4d8182d6..0322c2ce9 100644
--- a/doc.zih.tu-dresden.de/docs/jobs_and_resources/slurm_examples.md
+++ b/doc.zih.tu-dresden.de/docs/jobs_and_resources/slurm_examples.md
@@ -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
     ```
 
-- 
GitLab