Rajkumar Elumalai
Rajkumar Elumalai

Reputation: 1560

Join Two csv file to one Csv file Based matching Column

I have 2 csv file,

first.csv

 Name  desc date

 raj   test  1-2-2015
 kumar test  2-2-205

secound.csv :

 Name   Text

 raj   Testvalue

I need to join this two csv file , if name are matching then, "Text" filed to add in first.csv file.

output.csv

 Name  desc   date     Text

  raj  Test  1-2-2015  TestValue   

Suggest me how to do this in php or linux cmd.

Upvotes: 2

Views: 150

Answers (1)

khrm
khrm

Reputation: 5753

This should work.

join  <(cat first.csv) <(cat second.csv)

Upvotes: 1

Related Questions