How can I quickly sum all numbers in a file?

You can use awk:

awk '{ sum += $1 } END { print sum }' file

Leave a Comment