I have a rather large text file(thousands of lines) in following format:
123.123 5
123.123 91
156.456 45
233.185 85
233.185 4
257.448 1
455.456 60
455.456 2
The first column are sorted coordinates (x.y) and the second one is the label (0 to 1000). As it can be seen the coordinate 123.123 has label 5 and label 91 or coordinates 156.456 has only label 45
I want another file as output with all the coordinates (not duplicate) and the different labels (this label will appear several times duplicate), the output for this example must be:
123.123 5 91
156.456 45
233.185 85 4
257.448 1
455.456 60 2
My idea was to remove duplicate strings (coordinates, so only first column), leaving alone labels and then reorganize the lines or another way but I am stuck with which commands to use.
Another option is with databases.