I have thousands of flat files in two directories dir1 and dir2. Now, I want to generate diff report of the pair of same file names in two other different directories success (if diff is exactly same) and failure (if diff is not same).
For example:
if dir1 has files: file1, file2
and if dir2 has files: file2, file3
Then I'd take the diff of dir1/file2 and dir2/file2 only. file1 and file3 will be ignored as they don't have their respective pairs.
How can I do it using shell script? Is it possible using system commands?