spaces in array field

I have a file, names(i) where each entry is 'first last' name. 'cat names' is fine. But in a shell script

>for file in $(cat names)
> do
>   echo $file
> done

the first and last name appear on 2 lines. I have tried escaping and quoting the space but to no avail. The names are to be used in renaming jpg files and will be used to print labels with picture and name. What must I do?

Chuck

while read file
do
echo $file
done < names
>for file in "$(cat names)"
> do
> echo $file
> done

Hi.

All that does is give the entire file to "$file" in one go... and it's also eligible for the UUOC award.

The while-loop approach is the better one.

Please post your input file.