Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

comparing csvs

$
0
0

I have 2 CSV files wirh multiple named columns where one column - ID - is identical in both and other column of my interest where I need to check if for the same ID the value present in that column match. Example csv

ID  value1 valeue2 Name

Dan  dog      grey     somename

csv 2

ID value1 value2 Name

Dan  cat   brown  somename

So in the above example I have Dan in both the csvs but then my value1 in one case is "cat" and in other "dog". No matter other fields I'm only interested in ID and value1 and comparing if value1 matches for a given ID. How would I scan the first csv to find a corresponding ID in the second one and then check if the respective values match or not?

 

yaro


Viewing all articles
Browse latest Browse all 21975

Trending Articles