Skip to content
Snippets Groups Projects
Commit 5d3a1521 authored by Paul Gierz's avatar Paul Gierz
Browse files

style: apply better indentation to Enrico's script

parent ef4f781f
No related branches found
No related tags found
No related merge requests found
...@@ -52,19 +52,17 @@ tmp=${nodeslurm#"m["} ...@@ -52,19 +52,17 @@ tmp=${nodeslurm#"m["}
nodes=${tmp%]*} nodes=${tmp%]*}
myarray=(`echo $nodes | sed 's/,/\n/g'`) myarray=(`echo $nodes | sed 's/,/\n/g'`)
idx=0 idx=0
for element in "${myarray[@]}" for element in "${myarray[@]}"; do
do if [[ "$element" == *"-"* ]]; then
if [[ "$element" == *"-"* ]]; then array=(`echo $element | sed 's/-/\n/g'`)
array=(`echo $element | sed 's/-/\n/g'`) for node in $(seq ${array[0]} ${array[1]}); do
for node in $(seq ${array[0]} ${array[1]}) nodelist[$idx]=$node
do idx=$idx+1
nodelist[$idx]=$node done
idx=$idx+1 else
done nodelist[$idx]=$element
else idx=$idx+1
nodelist[$idx]=$element fi
idx=$idx+1
fi
done done
for element in "${nodelist[@]}" for element in "${nodelist[@]}"
......
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