Skip to content

Instantly share code, notes, and snippets.

@masolino
Created February 1, 2015 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masolino/72d4c447e88c49d2d372 to your computer and use it in GitHub Desktop.
Save masolino/72d4c447e88c49d2d372 to your computer and use it in GitHub Desktop.
Diff
#!/usr/bin/env ruby
f1 = IO.readlines("file1.txt").map(&:chomp)
f2 = IO.readlines("file2.txt").map(&:chomp)
File.open("diff.txt","w+"){ |f| f.write((f2-f1).join("\n")) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment