How to sum a particular column of a CSV file with awk
Answer:
Assume you have a CSV file like the following (only contain number)
1,2,3 2,3,4 3,4,5 ...
How do you sum the nth column of this file? It is easy with the use of awk
e.g. Assume you want to sum the 2nd column:
# awk -F "," '{ sum += $2 } END { print sum }' test.txt