Server!/Horror! I have a magnet and I don't mind using it!

µ-awk

My personal µ-awk tutorial, just some notes I like not to forget...

Print the average of a column:

grep daemon_with_interesting_column_eight daemon.log | awk '{sum+=$8} END { print "Average = ",sum/NR}'
Print the average of a column fullfilling a constraint:
awk '/$8>=0.02/  {sum+=$8} END { print "Average = ",sum/NR}'

Generated: 2017-11-02 10:20:47 +0100