Removing unneeded values from a file

Write your question here.
Hello all.
I am having problem with deleting unwanted data from a file.
For example:
if the file is like given below:
0 7 9
0 7 2
0 8 1
1 2 6
1 2 8

I need to filter the values and get the desired result as

0 7 2
0 8 1
1 2 6

that is no duplicates in first and second column and minimum value in the third column.

This might be a very easy problem for u guys but i am a newbie.
I will be thankful if someone can suggest only a logic.
A code on this will be a great help
Thanks.
Topic archived. No new replies allowed.