Store the output values in array

Hi,

How to store the values in array from output result,

EG:

I have the result like this,

ps, google, 1.txt, 1
sam, google, 2.txt, 2

These are the four values followed by comma in two sets. I need to store these values set by set. One set contains four values followed by comma.

Script should run one set by set. Once complete the first set, it should take second.

for i in ${name[@]}
do
echo $i
done

USAGE="$0 [initial] [name] [txt file] [value:0|1]

Those values should store in these variable, once its get first set, script should run follows, this should be in loop

Please give some idea

Why not while loop .. Expecting this ..??

while IFS=, read v1 v2 v3 v4
do
        echo "USAGE $0 $v1 $v2 $v3 $v4"
done < infile

Thanks for the reply,

The results i am getting from python script.

My shell script looks like this,

project=`fab $string $recuse details $host`
for i in ${project[@]}
do
echo $i
done

USAGE="$0 [initial] [name] [txt file] [value:0|1]

I am getting the values from python and i am storing in 'project'. The result have mentioned before in set followed by comma.