From: Kresimir Bojcic Date: 2011-05-01T17:50:07+09:00 Subject: Re: merging 2 csv files and sorting merged file --0016e65c7334809b5d04a232f229 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Or you can cat file1 file2 ! sort Just put pipe sign instead of ! :) Kresimir Bojcic www.kresimirbojcic.com On May 1, 2011 9:59 AM, "Askar Ka" wrote: > Here I post the answerI got from japanese mailing list, > which worked for me > > > out =3D File.open("file3.csv", "a+") > File.open("file2.csv", "r") do |file| > file.each_line do |line| > out.puts line # =E5=87=BA=E5=8A=9B > end > end > > OR > > File.open("file3.csv", "a+") do |out| > out.print IO.read('file2.csv') > end > > -- > Posted via http://www.ruby-forum.com/. --0016e65c7334809b5d04a232f229--