Assigning zero to element of ksh array.

set -A matched                                          #find referenced files.
        for i in ${file_names_html[*]}
        do
                counter_j=0
                for j in ${file_names_minus_index[*]}
                do
                        match=`cat $i | grep "<a.*href=\"$j\".*>.*<\/a>" | wc -l`
                        if [[ $match -ne 0 ]]
                        then
                                ${file_names_minus_index[$counter_j]}=0
                        fi
                        let counter_j=$counter_j+1
                done
        done

I am getting the below error message. I am not sure why. Plz help.

2_a: line 52: /Users/2_dir/public_html/a=0: not found

I took away the { } from the array and it seems to work now. Why did that matter?

You must have also taken away the $-sign, no?

file_names_minus_index[$counter_j]=0

The syntax you used earlier is used for referencing an array element, not for setting one.