Repeated lines-case sensitive

Hi, users file contains below names i have a requirement to keep only one case sensitive user. For e.g if user name is "aaa" then only aaa should be there in the file and other matching users(AAA,aaA) should be deleted.

Tried multiple options but no luck can you please help.

aaa
abc
AAA
aaA
aBC

thanks
satya

Try

awk '!A[tolower($0)]++' infile > outfile

Test

akshay@Aix:/tmp$ cat infile
aaa
abc
AAA
aaA
aBC
akshay@Aix:/tmp$ awk '!A[tolower($0)]++' infile
aaa
abc

How do you tell which of the different spellings is the right one? A reference to /etc/passwd, for instance?