title: Need to calculate standard deviation from an array using bash and awk?
body: <p>Guys I'm new to awk and I'm struggling with awk command to find the standard deviation.</p>
  
  <p>I have got the mean using the following:</p>
  
  <pre><code>echo ${GfieldList[@]} | awk 'NF {sum=0;for (i=1;i&lt;=NF;i++)sum+=$i; print "Mean= " sum / NF; }'
  </code></pre>
  
  <p>Standard Deviation formula is:</p>
  
  <pre><code>sqrt((1/N)*(sum of (value - mean)^2))
  </code></pre>
  
  <p>I have found the mean using the above formula</p>
  
  <p>Can you guys help me with the awk command for this one?</p>