Does the basis of diff -r not provide what you need?
It tells you:
a) which files exist in only one or the other directory tree
b) the differences between two corresponding files.
eg:
Code:
$ diff -r level0*
Only in level0.mirror/a/print: file
Only in level0/b/print: file
diff -r level0/bak/d/dir/file1 level0.mirror/bak/d/dir/file1
0a1
> I'm different
You can parse the output as diff lines always contain text output in the above demonstrated format (eg. "Only in ...", "> ...", etc.), or you can specify your own output format.
You can also use the -q option to give you easier parsing:
Code:
diff -qr level0*
Only in level0.mirror/a/print: file
Only in level0/b/print: file
Files level0/bak/d/dir/file1 and level0.mirror/bak/d/dir/file1 differ
and you can then perform your own diffs of the lines "Files...differ",
Diff has plenty of good options - be sure to review the man page.