First of all, thank you for helping with my problem. I have a csv file where I have a column that have different letter encoded, as you can see here.
ABC
CD
EF
F
D
F
AS
I know how to calculate the proportion of F in the column and display the output as follows:
awk 'BEGIN{sum=0;count=0}{count++}{if($1="F")sum+=$1}END {print sum/count}'
0.286
But my problem is that I want to do it generally with every single line of the column that have one character so the output will be:
F 0.286
D 0.143
Thank you everyone for your help.