Shell Programming and Scripting

I want to compare some files.

say iam having 2 sets of files ,each is having some 10 files.
ie,

file1
1a.txt
1b.txt
1c.txt
...
file2
2a.txt
2b.txt
2c.txt
...

i need to read line by line of this files parralley..

ie.. i want to read file1 first line that is 1a.txt and file2 first line (2a.txt) and pass this 2 input to comm command to compare .

this can in while loop ..so entire files have to pass for the compare command

Pls help to script.

paste file1 file2 > file3

while read one_line
do
first_file=`echo $one_line | awk '{ print $1 }'`
second_file=`echo $one_line | awk '{ print $2 }'`
comm -12 $first_file $second_file
done < file3

this may help you

Thank you very much..it is working fine.

Thanks a lot.