Hi everyone! I'm new to awk and i'm having troubles with a script i thought would be easier. I have a variable number of columns with numbers (e.g. 4.45), and some of the "cells" have missing values (--). I have to calculate the mean of each row, adding a new column with it. I tried something like:
In that example i'm not calculating the mean but just the sum as a test, but the results are senseless.
I also have to add a "Missing" column where i count the missing values of each row. What am i doing wrong? Thanks in advance!
Thank you all! The error was in the use of $ as kloetzl stated