Thread Textdateien vergleichen *war Dani the Newbie
(13 answers)
Opened by Dani at 2012-06-27 15:57
Diff::LibXDiff laesst sich nicht installieren :-(
Mit Text:Diff komme ich nicht hin, was nur irgendwie für JEDEN verständlich wird :-( Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 use Text::Diff; use Text::Diff::Table; my $diff = Text::Diff::Table->new; $tst1 = '/home/dani/perl/test12.pl'; $tst2 = '/home/dani/perl/test12.pl.old'; $diff = diff $tst2, $tst1, { STYLE => "Table" }; $diff = diff $tst2 => $tst1; use Algorithm::Diff; $diff = Algorithm::Diff::sdiff($tst2,$tst1); use YAML::Dumper; my $dumper = YAML::Dumper->new; $dumper->indent_width(4); $bla = $dumper->dump($diff); $bla =~ s/</</g; $bla =~ s/$tst2/Neue Version/g; $bla =~ s/$tst1/Alte Datei/g; print '<pre>'.$bla.'</pre>'; modedit Editiert von GwenDragon: CODE-Tags hinzugefügt |