Skip to content

Commit

Permalink
Fix shellcheck issue with array
Browse files Browse the repository at this point in the history
  • Loading branch information
Raleksan committed Oct 3, 2024
1 parent 31121be commit 03d1b17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion steps/report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ st_list=${TARGET}/temp/structured-list-of-metrics.tex
rm -f "${st_list}"
touch "${st_list}"

groups=($(grep -oP '\[.*?\]' "${list}" | sed 's/[][]//g' || : ) "Ungrouped metrics")
groups=()
while IFS='' read -r line; do
groups+=("$line")
done < <(grep -oP '\[.*?\]' "${list}" | sed 's/[][]//g' || : ; echo "Ungrouped metrics")
for idx in ${!groups[@]}; do
printf "\\item %s\n" "${groups[$idx]}" >> "${st_list}"
printf "\\\\begin{itemize}\n" >> "${st_list}"
Expand Down

0 comments on commit 03d1b17

Please sign in to comment.