Guest User

Untitled

a guest
Apr 23rd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. file1 = File.open('file1.txt').to_a
  2. file2 = File.open('file2.txt').to_a
  3. new_words = []
  4.  
  5. file1.map! do |line|
  6. line.strip!
  7. end
  8.  
  9. file2.each do |line|
  10. login = line.split(';')[0].strip
  11. if file1.index(login.md5).nil? then
  12. new_words << line
  13. end
  14. end
  15.  
  16. f = File.open('file3.txt', 'a')
  17. f.write new_words.join.strip
  18. f.close
Add Comment
Please, Sign In to add comment