September 4th, 2012, 11:38 AM
hey guys, does anyone knows how to compare 2 text files and identify what has been added and what has been removed from the one file to the other one? i dont want to use diff because diff compares line by line only and if i add a new line it will print on screen everything.
September 4th, 2012, 12:16 PM
I'm not sure I understand your objection to using the diff utility, but it sounds like you're not passing it the proper option parameters.
Have you tried creating a "unified" diff?
On the Perl side, if you want to compare the files and only receive a boolean answer, then you should look at the File::Compare module.
If you want to get an actual diif which can be applied via the patch utility, then look at the Text::Diff module.
September 6th, 2012, 02:49 AM
Where i can find to download this program?
September 6th, 2012, 09:18 AM
I assume you're referring to the Perl modules I suggested. Click on the links I provided in my post to find the documentation for each module and the download link for the tar file of the module is on the upper right of the page.
Originally Posted by Ion83