From: Mmcolli00 Mom Date: 2008-12-11T01:46:18+09:00 Subject: Re: compare 2 text files - check for difference - Please help If anything, do you know how to get this into a new text file? require 'rubygems' require 'diff/lcs/array' lines1 = lines2 = nil File.open("xml1.txt") { |f| lines1 = f.readlines} File.open("xml2.txt") { |f| lines2 = f.readlines } diffs = Diff::LCS.diff(lines1, lines2) sdiff = Diff::LCS.sdiff(lines1,lines2) p sdiff = Diff::LCS.sdiff(lines1, lines2) File.open('log.txt', 'w') do |f1| f1.puts Diff::LCS.sdiff(lines1, lines2) f1.close end (this is what it outputs..it doesn't show @action, element like the p sdiff creates) # # # #... -- Posted via http://www.ruby-forum.com/.