Tú Linh Nguyễn
New member
How do you sum in awk?
Answer
How to Sum Values in Awk
Answer
How to Sum Values in Awk
- BEGIN{FS=”t”; sum=0} The BEGIN block is only executed once at the beginning of the program. …
- {sum+=$11} Here we increment the sum variable by the value in field 11 for each line.
- END{print sum} The END block is only executed once at the end of the program.