help for 'sort' command

Please help me

I have a file abc.txt as,

raj 100 hasan 90
guru 300 anekal 10
guru 180 belgam 80
hamsa 150 mysore 50
janak 325 belgola 25
ganap 221 kailas 21

now my requirement is, I want to sort the file based on the first column
and also for the same first column if there are any duplicates, in such cases
it has to select only the first occurence. Also it has to delete the second
occurence eventhough it is not completely similar except first column.

Consider the above example,

In that my requirement is to select the first occurence for the 'guru' record.
i.e,. output should only display:

raj 100 hasan 90
guru 300 anekal 10
hamsa 150 mysore 50
janak 325 belgola 25
ganap 221 kailas 21

and the second occurance for the 'guru' record should not get extracted.
i.e,. record "guru 180 belgam 80" should not produce.

I've tried with the below sort option:

sort +0 | uniq | abc.txt

But still my output is not as per the above expectation.

Any Help would be much appreciated.

Much Regards,
Ganapati

sort -t" " -r -k1,1 -u abc.txt

Great, this is working.
Thanks a lot for anbu.

Cheers~~
Ganapati.

hi every one

when this command runs in terminal
sort -t" " -r -k1,1 -u abc.txt
this can be very useful
but in program i cant
i used this
main()
{
popen("sort -t" " -r -k1,1 -u abc.txt","r");
}

abc.txt
z
b
c
q
a
j

like this
how can sort it in programatically(file sorting).
please show me the way
i hope u can do this

thank you i advance

system("sort -t' ' -r -k1,1 -u abc.txt > newfile" )

you are Great, this is working.
Thanks a lot anbu.