Requirement I have tst1.txt and tst2.txt tst1.txt have data as below Note: ABCD & EFGH are segments in below data ABCD TEST1 TEST2 TEST3 EFGH TEST1 TEST2 TEST3 tst2.txt have data as below ABCD TEST1 TEST2 TEST3 EFGH TEST1 TEST2 TEST3 TEST4 TEST5 Now diff between two files is in tst2.txt the last two rows "TEST4", "TEST5" I need to have a script which gives output as below Diff between two files is from segment EFGH TEST4 TEST5