:::: MENU ::::

Monthly Archives / April 2016

  • Apr 22 / 2016
  • 0

Aggregate results from command line on a specific field (e.g. netstat per IP)

To aggregate results from a command line and count number of results for each field, you can combine multiple tools like awk, cut, uniq and sort to obtain the expected results.

For example, if you want to retrieve count of connections opened per IP onto your server, just run:

You will get a results like:

If you want to aggregate only results on a particular keyword (a port for example), you can also integrate a grep option to filter your results:

Question ? Contact