awk problem

hi,

i have file like :

file1:

variable1
variable2
variable3
.
.
and file2 like

var1,var2,var3
var4,var5,var6
.
.

i want to print the $1 of file1 in the $3 of file2 with awk?

awk -F "," {print $1} file1 > file2 don't give me the right solution?

help

Here is one way of doing it:

 
paste -d',' file2 file1 | awk -F"," '{ printf("%s,%s,%s\n", $1, $2, $4)'