and you want to add up a
specific column, the following
command can be used:
$ awk -v col=2 '{ total += $col } END { print total }' FILENAME
Where "col=2" is the second column in the file. NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted
by various unix admins around the globe. UGU suggest you read and
test each tip in a non-volitile environment before placing into
production.