With awk you can try this
{ a[$1] = a[$1] ";" $2 } END { for (item in a ) print item, a[item] }
So, if you save this awk script in awkf.awk file, and if your input file isile.txt, run the script
awk -f awkf.awk ifile.txt | sed 's/ ;/ /'
The sed script command is to remove the lead;
Hope this helps
source share