gcue Posted May 14, 2008 Posted May 14, 2008 is there a way to show the differences with the context of two text files?
PsaltyDS Posted May 14, 2008 Posted May 14, 2008 (edited) is there a way to show the differences with the context of two text files?WinDiff Edit: Even better: WinMergeThanks for the reminder, enaiman. Edited May 14, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
gcue Posted May 14, 2008 Author Posted May 14, 2008 theres no way to do this in autoit?i was looking through the functions.. would this be able to do it??StringRegExp --------------------------------------------------------------------------------Check if a string fits a given regular expression pattern.
ACS Posted May 14, 2008 Posted May 14, 2008 You could probably just use StringCompare.You'll have to read up on how the algorithm works...http://en.wikipedia.org/wiki/Diff#Algorithmhttp://en.wikipedia.org/wiki/Longest_commo...equence_problem
enaiman Posted May 14, 2008 Posted May 14, 2008 It is possible but it might not be so easy to do it.Some things to consider: - if you intend to read line by line from text files and compare them: when 1 of the file has an extra line the comparison will show that everything coming after that line being different - if you plan to read the whole file in 1 string: only 1 character difference will cause everything coming after that char to be reported as different - the differences might occur anywhere in the file... and many other things ...In my opinion it would be easier to use WinDiff as PsaltyDS suggested or WinMerge SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now