prodevel has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I've got 2 files containing cksums & find info from two different dates.
File1:
1642397863 -rw-r--r-- utility 148 Sep 8 14:43 file1
2722648216 -rwxr-xr-x utility 83285 Sep 11 15:25 file2
2314555204 -rw-rw-rw- utility 428116 Sep 26 13:59 file3

File2:
8888888888 -rwxr-xr-x utility 83285 Sep 11 15:25 file2
2314555204 -rw-rw-rw- utility 428116 Sep 26 13:59 file3
1642397863 -rw-r--r-- utility 148 Sep 8 14:43 file4

I'm mad at myself for not knowing the best way to do this (data strucs, algorythms, etc.)

I want to perform a "minus" (first file names minus second file names.)
product: file1

Second an "intersection" (second minus first - I think intersection is the term =)
product: file4

Third, I want a diff of the REMAINING files if cksum, user, size, etc. are different.
product:

2722648216 -rwxr-xr-x utility 83285 Sep 11 15:25 file2
8888888888 -rwxr-xr-x utility 83285 Sep 11 15:25 file2

Actually, I'll put these lines together, side-by-side with a flag next to the set
that differed.

Something like:
   date1             date2            date1           date2...
   ------------- -------------  -----------  ----------
> 2722648216 8888888888 -rwxr-xr-x -rwxr-xr-x utility utility 83285...

This was extremely useful to my dev efforts in the past, and to others as well
I previously accomplished this useful task by loading the data into Oracle.
Since becoming a member of this site, I refuse to do anything that Perl can
do itself just b/c I don't yet know how.

Regards,

Rob

Replies are listed 'Best First'.
Re: PVCS (Almost) More like PVCS::Audit
by chromatic (Archbishop) on Sep 28, 2000 at 08:18 UTC
      You're a rock star, but you already know that. That algo in "How do I compute..."
      is suhweeet. I'll have to take a bit more time sitting w/Algorithm::Diff.

      Thank you, you've made my day more valuable.

      Rob