<
voodoo...@gmail.com> wrote:
> Hi,
> I'm trying to elabotare a script to calulate variance of column of values skip first row
>
> awk 'NR>1''{ s += $2 } END { print "sum: ", s, " average: ",), "
> variance: ", 1 / ((NR-1) - 1) * sum($2- s/(NR-1))^2, " samples: ", (NR-1) }'
>
> I obtain error
> fatal: `sum 'function not defined
>
> regards
>
> Al
>
Here: is error
sum($2- s/(NR-1)
If you want sum so You have to do like this
s/(NR-1)
replace divide by this "+" -without quotation marks