#for $r in $r1 echo "${r.text}" >> out1; #end for #for $r in $r2 echo "${r.text}" >> out2; #end for