i don't understand this error that is always giving me, can you pls help me?
I am doing a homework and is really important and I am trying to figure out how to solve it since this early morning
param0="KcgMy4kfBovoomVUcvtkxXqh1xosedAq";
param1="r2UmsEnodjLin2zT94M7eAX76vpB7gTe";
param2=97;
output="";
f=0;
for (( i=0, j=0; i<${#param0}, j<${#param1}; i++, j++ ));
do c0=${param0:$i:1};
c1=${param1:$j:1};
renum="^[0-9]+$";
if [[ $c0 =~ $renum && $c1=~ $renum ]];
then param2=$((param2 - i - (c0 * c1)));
if (( param2 < 1 ));
then param2=$((-1 * param2));
f=$((!f));
fi;
output+=${param2};
else reupper="^[A-Z]+$";
if [[ $f -eq 1 && $c0 =~ $reupper ]];
then output+=${c0};
else output+=${c1}${c0};
fi;
fi;
if [[ $c0 =~ $realpha && $c1 =~ $realpha ]];
then reverse="";
for ((k = ${#output} - 1; k >= 0; k--));
do reverse=${reverse}${output:$k:1};
done;
output=$reverse;
fi;
done;
echo ${output:0:32};