[GLLUG] Merging Records in Input

Mick Farmer mick at plan7.co.uk
Thu Dec 5 22:38:37 UTC 2013

Dear GLLUGers,

I have an input consisting of two fields such as

7 010c
7 060b
8 003d
8 003g
8 005n
8 008c
8 010a
9 100c
11 005m
11 013a

which I want to merge on the first field (key) as follows

7 010c 060b
8 003d 003g 005n 008c 010a
9 100c
11 005m 013m

I'm sure there's a UNIX utility that does this (sort?, uniq?) but can't
currently find it.  Can anyone help?

Many thanks in advance.


Dr Mick Farmer

Registered Linux User# 551012

More information about the GLLUG mailing list