I have a datafile, which looks like:
1 4.2
1 5.6
1 3.3
.
.
1 5.3
2 1.4
2 3.2
2 7.2
.
.
.
2 6.6
.
.
.
100 4.1
100 5.8
100 8.8
.
.
.
100 7.7
There are 100 lines for each different value in the first column, i.e. I have 10000 lines with two columns. I would need to rearrange the elements in such a way to get:
1 4.2 5.6 3.3 ... 5.3
2 1.4 3.2 7.2 ... 6.6
.
.
.
100 4.1 5.8 8.8 ... 7.7
That is, I need to get a 100x101 array. I'm thinking about using awk, but I am stuck. Any ideas?
Igor