App-sdif
view release on metacpan or search on metacpan
script/cdif view on Meta::CPAN
=item B<--linebyline>, B<--lxl>
Compare input data line-by-line. Consider the inputs as pairs of two
lines each, and output the result of comparing each two lines.
Suppose you have a document with old and new text on lines beginning
with L<OLD:> and L<NEW:> labels.
OLD: this is old text
NEW: and this is updated document
Only this old/new part can be compared using B<greple>'s B<-Mtee>
module as follows.
greple -Mtee cdif --lxl -- --cm=N -GE '^OLD: (.*\n)^NEW: (.*\n)'
B<-Mtee> module sends matched parts to the filter command and replace
them by its result. Consult L<App::Greple::tee> for detail.
You can use L<teip(1)> command as well.
( run in 0.218 second using v1.01-cache-2.11-cpan-2b0bae70ee8 )