Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

AWS Cloud

awk reports

This revision card explains awk reports. It starts from the need that totals and counts in one line. It describes arrays group by a key. The how-to section notes END prints the results. An example on the card is hits per IP.

awk reports Totals and counts in one line. Arrays group by a key. END prints the results. Hits per IP.
awk reports · Download PNG
Read card text

What this card says

Why do we need it?

Totals and counts in one line.

What is it?

Arrays group by a key.

How to do it

END prints the results.

Example

Hits per IP.

awk '{c[$1]++} END {for(i in c) print i, c[i]}' access.log

See all AWS revision cards