set={} File.open(ARGV.shift) do |fp| for line in fp line.chomp! set[line[0,4]]=line end end File.open(ARGV.shift) do |fp| for line in fp cccc=line.chomp[0,4] set.delete(cccc) end end for line in set.values puts line end