Find duplicate rows between files

Hi champs,

I have one of the requirement, where I need to compare two files line by line and ignore duplicates. Note, I hav files in sorted order.

I have tried using the comm command, but its not working for my scenario.

Input file1

srv1..development..employee..empname,empid,empdesg
srv1..enhancement..Team_Level..level1,level2,level3
srv0..testing..functional..test1,test2,test3
srv2..analog..analysis_tb..step1,step2,step3
srv2..Zoo..India..chennai,delhi,Agra

Input file2

srv1..development..employee..empname,empid,empdesg
srv1..enhancement..Team_Level..level1,level2,level3
srv2..analog..analysis_tb..step1,step2,step3
srv0..testing..functional..test1,test2,test3
srv2..Zoo..India..chennai,delhi,Agra

Using the command:

comm -13 Inputfile1 Inputfile2

Final output file which I am getting

srv1..development..employee..empname,empid,empdesg,empsalary
srv2..analog..analysis_tb..step1,step2,step3
srv0..testing..functional..test1,test2,test3
srv2..Zoo..India..chennai,delhi,Agra

But I need output as below:

srv1..development..employee..empname,empid,empdesg,empsalary

Note: need to ignore duplicate lines by checking these delimiters (.. & ,) irrespective of checking line by line.

Please help me here..

Cannot figure out from where empsalary column came in your output.

Below code compare file1 and file2 line by line and if match it's printing line from file2. Could this help you ?

 awk 'NR==FNR{a[NR]=$0;next}
{if (a[FNR] == $0 ) { print}}' file1 file2