Then write a separate script (much simpler) to compare the lists of file names and checksums from the two hosts, to report (1) files on A not on B, (2) files on B not on A, and (3) files with same name on each host but different content.
Bear in mind that the only reason you would need to write a perl script to do this is so you could do it easily on the windows machines. The standard tools on any unix box are already on hand to do it all with a couple simple command lines:
# on host.A: find /base/dir/path -type f -print0 | xargs -0 md5 > host.A.checksum.l +ist # and likewise on host.B, then put both list files in one place and tr +y: diff host.A.checksum.list host.B.checksum.list
Actually, these tools (as well as a couple different Bourne-like shells, bash and ksh) have been ported to Windows (look for Cygwin, AT&T Research Labs "UWIN", maybe others), so you could do shell commands like the ones above on all your machines.
In case diff makes the list comparison a bit too opaque for you, I posted a handy list-compare utility that might help with the last step, and posted it here: cmpcol.
(update: It may be that I have misread your post. For the case of the same file name existing on two hosts, the plan I suggested will only report whether they are identical or not. If you actually want to describe the nature of differences, this plan will at least tell you which files need to be inspected in closer detail, which will save you a lot of time and trouble. Ideally, you would have just a few pairs of files that need to be fetched into a common location, and you can use "diff" on them, or whatever.)
In reply to Re: Generic compare script.
by graff
in thread Generic compare script.
by TeraMarv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |