how to get unique values set from a repeating values list
- by Mariselvam
I need to parse a large log file (flat file), which contains two column of values (column-A , column-B).
Values in both columns are repeating. I need to find for each unique value in column-A , I need to find a set of column-B values.
Is this can be done using unix shell command or need to write any perl or python script? What are the ways this can be done?
Example:
xxxA 2
xxxA 1
xxxB 2
XXXC 3
XXXA 3
xxxD 4
output:
xxxA - 2,1,3
xxxB - 2
xxxC - 3
xxxD - 4