-
-
Save kylemclaren/9660938 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# script to compare and see what lines are in file1 but not file2 | |
f1 = File.open('file1.txt') | |
f2 = File.open('file2.txt') | |
file1lines = f1.readlines | |
file2lines = f2.readlines | |
file1lines.each do |e| | |
if(!file2lines.include?(e)) | |
puts e | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment