Sorry, I’m addicted to puns. ![]()
This is a note for me, you and Michele: do you want to get the sum of a set of integers? Try this one-liner:
awk '{TOT += $0} END {print TOT}' your_filename
Use $0 if your_filename has lines with one integer each, of course you can use $another_integer if you want to get the sum from a given column.
Last update: 2008-02-01

One Comment
Thanks, very helpful. Much better and smarter than any possible script