Parsing out the first (top) data lines of each category

Hi All,
I need some help in parsing out the first (top) data lines of each category (categories are based on the first column a, b, c, d, e.( see example file below) from a big file

a dfg 3 6 8 9
a fgh 5 7 0 9
a gkl 5 2 4 7
a glo 7 0 1 5
b ghj 9 0 4 2
b mkl 7 8 0 5
b jkl 9 0 4 5
c jkl 2 4 5 7
c klm 0 3 6 7
d kml 9 2 5 7
e lsd 3 6 8 9
e jko 4 5 7 8
e kom 8 0 2 1

The output file I need is

a dfg 3 6 8 9
b ghj 9 0 4 2
c jkl 2 4 5 7
d kml 9 2 5 7
e lsd 3 6 8 9

I just wanted to parse out the first line in each category of a, b, c, d. In my original file I have thousands of such category.
Please let me know the best way in awk or sed to perform this task.
Thanks

$ awk '!L[$1]++' file1
a dfg 3 6 8 9
b ghj 9 0 4 2
c jkl 2 4 5 7
d kml 9 2 5 7
e lsd 3 6 8 9

You could also do it with sort:

sort -uk1,1 file1
1 Like