Doubt

Hi,

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,

Hello,

Per our forum rules, all threads must have a descriptive subject text. For example, do not post questions with subjects like "Help Me!", "Urgent!!" or "Doubt". Post subjects like "Execution Problems with Cron" or "Help with Backup Shell Script".

The reason for this is that nearly 95% of all visitors to this site come here because they are referred by a search engine. In order for future searches on your post (with answers) to work well, the subject field must be something useful and related to the problem!

In addition, current forum users who are kind enough to answer questions should be able to understand the essence of your query at first glance.

So, as a benefit and courtesy to current and future knowledge seekers, please be careful with your subject text. You might receive a forum infraction if you don't pay attention to this.

Thank you.

The UNIX and Linux Forumso