Command in variable one are affecting output of other variable when displayed together in UNIX
Your input files probably have CR-NL line endings, so $res1 returns the cursor to the beginning of the line then then $res2 overwrites it. Run your files through dos2unix
to fix that.