exec 3<$1 4<$2 while read file1 <&3 && read file2 <&4 do code
done