for $word in $line returns filenames in the current directory unexpectedly

I am writing a script below, which has 2 loops. The outer one reads file sufffixed with a number and inner inside which loop through each line of the file and display each space delimited string. However, i find that the string printed out in the inner loop includes not only the delimited string in the file, but also the filename in the same directories.

#!/bin/bash
process_file="/home/eclipse/misc/crontab.all"
rm $process_file
for ((i =5;i<=5;i++))
do
        host="edev$i"
        filename="/home/eclipse/misc/$host.crontab"
        ssh eclipse@$host crontab -l|grep start|grep -v \# > $filename
        echo $filename
        echo "Processes on $host:" >> crontab.all
        while read line;
        do
                echo "line=$line"
                STR_ARRAY=(`echo $line | tr "," "\n"`)
                for y in "${STR_ARRAY[@]}"
                        do
                        echo "> [$y]"
                done
        done < $filename
done

The result is the same if i replaced the inner loop by:

for word in $line
do
    echo $word
done

Anyone can help? Thanks.

how is your crontab files? can you give a sample ?
and desired output?

The line

is causing your troubles. From man crontab (linux), a crontab entry is of the form:

minutes hours days months days-of-week command...

and most entries have at least one "". So when the above line is evaluated, the "" from the entry is treated as a wildcard, which expands to all the files in the current directory. You should use, at a minimum:

STR_ARRAY=(`echo "$line" | tr "," "\n"`)

Or you may want to change the while read line to something like:

while read minutes hours days months dows command; do