keeping last record among group of records with common fields (awk)

view story

http://www.unix.com – input: Code: ref.1;rack.1;1    #group1 ref.1;rack.1;2    #group1 ref.1;rack.2;1    #group2 ref.2;rack.3;1    #group3 ref.2;rack.3;2    #group3 ref.2;rack.3;3    #group3 Among records from same group (i.e. with same 1st and 2nd field - separated by ";"), I would need to keep the last record (or the record with the highest number in the last field, which is the same here). in order to get: Code: ref.1;rack.1;2 ref.1;rack.2;1 ref.2;rack.3;3 I think I managed to isolate records in groups by doing Code: BE (HowTos)