Error with while loop ksh


while [[$a -ne 25]];do
        first[$b]=${hat[$a]}
        echo "${first[$b]}"
        b=$((b+1))
        a=$((a+5))
done

I'm trying to append values from the indicated index of one array to other, but it gives me an error with while loop....suggesting that [[0: not found [No such file or directory].......
In the hat array, it contains many values and for the name first array, I want to append value to it from the hat array at every 5 interval.......

Hi
Try to insert spaces after "[" and before "]"

while [[ $a -ne 25 ]]; do

Also, variables are only used without the $ sign on the left side of the = sign and there should be no space before or after the = sign.