My problem is I am an administrator not code writer, but I need to total the columns in some data I am pulling out of the system accounting files. Basicly I am cutting out those processes I am interested in and writing to a file i need to total colum 5 and 6 of the files to total processor time and characters transfered.
This is file
cpu char
trans
uname xxxxx 10:00:01 10:00:01 0.03 8 0 whoami xxxxx 10:00:01 10:00:01 0.03 9 0
uname xxxxx 10:00:01 10:00:01 0.02 6 0
this is the script works except gives me zero totals and I need it to identify what total it is totaling
cat pacct* | grep airprice >air |ls -l air| awk '{sum +=$5} END {print sum}' >da
ta
This is file
cpu char
trans
uname xxxxx 10:00:01 10:00:01 0.03 8 0 whoami xxxxx 10:00:01 10:00:01 0.03 9 0
uname xxxxx 10:00:01 10:00:01 0.02 6 0
this is the script works except gives me zero totals and I need it to identify what total it is totaling
cat pacct* | grep airprice >air |ls -l air| awk '{sum +=$5} END {print sum}' >da
ta