in reply to quick and safe way to deal with this?
By just checking the file sizes, this will work a lot of the time to differentiate the two files:
#!/perl/bin/perl -w use strict; my $file1 = "2006.txt"; my $file2 = "2007.txt"; my $file1size = -s $file1; my $file2size = -s $file2; print "The files have ", $file1size == $file2size ? "the same" : "diff +erent", " size.\n\n";
In what way did diff not work? Diff should be able to do exactly what you're trying to do...
|
|---|