title: fatal: division by zero attempted
body: <p>when ever I am trying to calculate mean and standard deviation using awk i am getting "awk: fatal: division by zero attempted" error.</p>
  
  <p>my command is</p>
  
  <pre><code>BEGIN{
  recvs = 0;
  routing_packets = 0;
  }
  {
  state       =   $1;
  layer       =   $3;
  tipe_data   =   $6;
  }
  {
  if (state == "r" &amp;&amp; tipe_data == "tcp" &amp;&amp; layer=="AGT") recvs++;
  if (state == "s"  &amp;&amp; layer == "AGT" &amp;&amp; tipe_data =="AODV") routing_packets++;   
  }
  
  END{
  printf("##################################################################################\n");
  
  printf("\n");
  
  printf("                       Normalized Routing Load = %.3f\n", routing_packets/recvs);
  
  printf("\n");
  
  printf("##################################################################################\n");
  } 
  </code></pre>
  
  <p>thanks</p>