87.140.79.42 - - [23/Jan/2024:09:00:46 +0100] "GET /monitoring/pings/ HTTP/1.1" 200 814 "-" "Ruby"
87.140.79.42 - - [23/Jan/2024:09:00:46 +0100] "GET /monitoring/pings/ HTTP/1.1" 200 814 "-" "Ruby"
87.140.79.41 - - [23/Jan/2024:09:00:46 +0100] "GET /monitoring/pings/ HTTP/1.1" 200 814 "-" "Ruby"
87.140.79.42 - - [23/Jan/2024:09:00:46 +0100] "GET /monitoring/pings/ HTTP/1.1" 200 814 "-" "Ruby"
Count and sort the number of requests for a single IP address.
awk '{ print $1}' test.log | sort | uniq --count
1 87.140.79.41
3 87.140.79.42
awk '{ print $1}' test.log
87.140.79.42
87.140.79.42
87.140.79.41
87.140.79.42
sort
87.140.79.41
87.140.79.42
87.140.79.42
87.140.79.42
uniq --count
[1]1 87.140.79.41
3 87.140.79.42