Calculating sums using awk

Before I google that another time (I am pretty sure we’re standing a chance that google will explode in that case), here’s how you calculate sums using awk:

{% highlight bash %}
cat something | awk ‘{ SUM += $5} END { print SUM }’
{% endhighlight %}

Thank you!


Notice: compact(): Undefined variable: limits in /var/www/virtual/acidix/nxhelp.com/wp-includes/class-wp-comment-query.php on line 821

Notice: compact(): Undefined variable: groupby in /var/www/virtual/acidix/nxhelp.com/wp-includes/class-wp-comment-query.php on line 821

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/virtual/acidix/nxhelp.com/wp-includes/class-wp-comment-query.php on line 399