I have a text file called data.txt that contains 2 columns and 80,667 rows. The first 20 rows are, which is representative of all rows:   Column A     Column BACKR1/CCRL2     12.66ACKR1/CMKLR1    10.41ACKR1/CXCR4     13.01ACKR1/FZD5      10.72ACKR1/GPR107    10.22ACKR1/GPR137    10.73ACKR1/GPR146    11.93ACKR1/TAPT1     11.24ACKR1/TPRA1     11.81ACKR1/XPR1      10.01ACKR2/ACKR3     9.36ACKR2/ACKR3     10.48ACKR2/ACKR3     11.08ACKR2/ACKR3     11.11ACKR2/ACKR3     11.38ACKR2/ACKR3     11.73ACKR2/ACKR3     12.97ACKR2/ADGRA2    8.68ACKR2/ADGRA2    9.03ACKR2/ADGRA2    9.34As you can see, there are some duplicate values in column A (e.g. ACKR2/ACKR3, ACKR2/ADGRA2). What I'd like to do is create another file results.txt that contains the average, standard deviation and standard error of unique values, and how many times they appear in data.txt. For instance:   Value         Avg    Stdev    StdErr    CountACKR1/CCRL2     12.66    -         -         1ACKR1/CMKLR1    10.41    -         -         1ACKR1/CXCR4     13.01    -         -         1ACKR1/FZD5      10.72    -         -         1ACKR1/GPR107    10.22    -         -         1ACKR1/GPR137    10.73    -         -         1ACKR1/GPR146    11.93    -         -         1ACKR1/TAPT1     11.24    -         -         1 ACKR1/TPRA1     11.81    -         -         1ACKR1/XPR1      10.01    -         -         1ACKR2/ACKR3     11.46   0.84      0.35       7ACKR2/ADGRA2    8.69    0.33      0.19       3I am not too phased about getting both the standard deviation and standard error but it'd be nice to get at least one.I'm a biologist so I'm not too savvy with writing unix scripts. I've really got no idea where to start, any help would be appreciated. Sorry if something like this has been answered before, I searched but could not find anything.Many thanks!
Determining averages, stdev, stderror, and counts of values in a list
awk;sed
Not sure about the Stdev and Sterr calculation. but using this method, you can easily calculate it$ awk '{A[$1]++;B[$1]+=$2}END{print Value\t\tAvg\tCount;for (i in A){print i\tB[i]/A[i]\tA[i]}}' input.txtValue           Avg     CountACKR2/ADGRA2    9.01667 3ACKR1/GPR107    10.22   1ACKR1/XPR1      10.01   1ACKR1/CMKLR1    10.41   1ACKR1/CCRL2     12.66   1ACKR1/GPR146    11.93   1ACKR1/GPR137    10.73   1ACKR1/CXCR4     13.01   1ACKR2/ACKR3     11.1586 7ACKR1/TPRA1     11.81   1ACKR1/FZD5      10.72   1ACKR1/TAPT1     11.24   1awk '{A[$1]++;B[$1]+=$2}END{print Value\t\tAvg\tCount;for (i in A){print i\tB[i]/A[i]\tA[i]}}'  input.txt