So, I have data that looks something like this, listing the placings in each competition :
(about 500 rows of it in total)
1st Comp | FencerA | 1 |
1st Comp | FencerB | 2 |
1st Comp | FencerC | 3 |
2nd Comp | FencerD | 1 |
2nd Comp | FencerC | 2 |
2nd Comp | FencerA | 3 |
And I want to mangle it to look like this :
1st Comp | 2nd Comp | |
FencerA | 1 | 3 |
FencerB | 2 | |
FencerC | 3 | 2 |
FencerD | 1 |
And it should cope no matter how many competitions or different fencers are in the source list.
Or should I just stick to my awk script ?