Thanks PHV for your reply:
But when i do it, i have this result:
On script:
BEGIN{ FS=" "; sum=0; iFinal=6;}
{
for(j=1;j<=40;++j)tsum[j]+=$j
{
if (NR<=iFinal)
{
sum=sum + $j;
if (NR==iFinal)
{
average=sum/6;
printf "%.4s\n", average;
}
}
else
{
iFinal=NR +5;
sum= $j...
Hi everybody:
I just create awk script. This script calculate the average of a field, but i want to do it for every fields.
The original field has 40 fields of numbers like that:
38.00 51.00 10.00 -99.90 75.00 47.00 4.00 -99.90 69.00 121.00 62.00 6.00 70.00 43.00 36.00 49.00 8.00 36.00 50.00...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.