Suppose partition=9
then by checking that partition variable value ,i need to create an array variable which must contain 9 values and must be repeative as a,b,g,h,a,b,g,h,a...
Could you please help me in creating as above way..
let cnt=0
for i in a b g h a b g h a b g h a b g h
do
if [[ -z $partition || $cnt -gt $partition ]] ; then
break
fi
arr[$cnt]=$i
cnt=$(( cnt = 1 ))
done