Hi,
For example:
I have:
HostA,XYZ
HostB,XYZ
HostC,ABC
I would like the output to be:
HostA,HostB: XYZ
HostC:ABC
How can I achieve this?
So far what I though of is:
- Look through 2nd field and
sort
and
uniq
it
2. Use what I have from 1. and
grep
the first field.
3. Get the first field I got from
grep
and group them by
comma