I have a file with multiple entries and I have calculated the percentages. Now I want to know how many of my entries are there between 1-10% 11-20% and so on..
chr1_14401_14450 0.211954217888936
chr1_14451_14500 1.90758796100042
chr1_14501_14550 4.02713013988978
chr1_14551_14600 6.14667231877914
chr1_14601_14650 8.2662144976685
chr1_14651_14700 10.3857566765579
chr1_14701_14750 12.5052988554472
chr1_14751_14800 14.6248410343366
chr1_14801_14850 16.7443832132259
chr1_14851_14900 18.8639253921153
My percentages are in double,so it needs to be rounded off to the nearest and then accordingly calculate. How can I do this in awk?
o/p
0-10 5
11-20 5
21-30 0
31-40 0
so on until
90-100% 0
Thanks,