1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/usr/bin/env ruby require 'zipf' require 'set' to_exclude = {} f = ReadFile.new ARGV[0] while line = f.gets to_exclude[line] = true end while line = STDIN.gets if not to_exclude.has_key? line puts line end end