There's a number of ways to handle this, but what I would do is:
Code:
$ awk '{ sum = sum + $2 } END{ print sum}' data-file
There's a free online
gawk book that you should read if you don't understand what that is doing. (It's a good reference to keep bookmarked as well.)