Perl: the Markov chain saw | |
PerlMonks |
Re: multiple file readingby wine (Scribe) |
on Jul 09, 2001 at 16:09 UTC ( [id://94950]=note: print w/replies, xml ) | Need Help?? |
I know this is a Perl-forum but there is a very quick way to do this with uniq.
If the formats are exactly the same, you could use: cat file1 file2 | uniq -u to extract all lines that do not occur twice, i.e. when (tableA eq tableB && columnA eq columnB) fails. All lines that do occur twice can be extracted with: cat file1 file2 | uniq -d If you're files differ in format like the use of spaces or something, consider using a filter Note that this gives you no indication whether only the columns, or the tables or both didn't match. For that you have to user perl after all, I guess
In Section
Seekers of Perl Wisdom
|
|