From: Jonathan Hankins Date: 2006-08-25T13:40:09+09:00 Subject: Re: file compare and remove lines How about this (heh, just discovered File#readlines!): -- #!/usr/bin/ruby -w skip = Hash.new File.readlines(ARGV.shift).each do |line| skip[line.chomp.strip] = 1 end File.readlines(ARGV.shift).each do |line| print line unless skip[line.match(/^\s*(\d+)/)[1]] end -- +------------------+-----------------------------------------------------+ |Jonathan Hankins | jonathan-hankins@mindspring.com | +------------------+-----------------------------------------------------+