Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Powershell: Merge two columns with duplicate values in column1 to make column1 unique and add the values from column2

$
0
0

Dear powershell.com users,

I have a file which contains duplicate locations in column1 with unique values(names) in column2 I want to remove the duplicate locations from column1 and merge the names in column2 maybe you guys have the script to do this for me e.g.:

File:
Location, Names
Russia, Putin
Russia, Stalin
USA, Obama
USA, Bush
USA, Kennedy

Desired output:
Russia, Putin, Stalin
USA, Obama, Bush, Kennedy

If possible I would like to MD5 Hash the names as well.

Hope you guys can help me out with this one.

Thanks in advance!


Viewing all articles
Browse latest Browse all 6937

Trending Articles