I have a bash workflow that run some functions provided in the same code according to the number of the desired repetitions (defined as rep).
rep='4'
# run functions REP times
for i in $(seq 1 $rep); do
png_summary
hbond_summary
hbond_total_summary
done
I noticed that sometimes this does not work:
./vizu_ultimo.sh: line 384: syntax error near unexpected token `do'
./vizu_ultimo.sh: line 384: `(seq 1 $rep); do'
Since this eror occurs relatively rare I have not been able to understand what's wrong with the code ..