# -*- coding: utf-8 -*- require 'csv' a_csvs=[] b_csvs=[] succsess = [] failed = [] a_csvs_tmp = CSV.open('a.csv', 'r') b_csvs_tmp = CSV.open('b.csv', 'r') a_csvs_tmp.each{|x| a_csvs << x } b_csvs_tmp.each{|x| b_csvs << x } a_csvs.each do |x| a = b_csvs.select{|b| x[0] == b[0] and x[1] == b[1] } unless a.empty? succsess << a else failed << x end end puts "見つかったモノ" p succsess.flatten puts "失敗したモノ" p failed.flatten
0 件のコメント:
コメントを投稿