I have a file
192.168.10.1 - - [12/aug/20:23:30:41] "PUT /img.jpg" 200 -
192.168.10.2 - - [10/aug/20:01:20:30] "PUT /img.jpg " 404 -
192.168.10.2 - - [10/aug/20:12:10:15] "PUT /img.jpg " 200 2114
192.168.10.3 - - [09/aug/20:06:20:12] "GET / img.jpg" 200 377
192.168.10.1 - - [07/aug/20:12:40:20] "GET /img.jpg" 200 2114
192.168.10.1 - - [01/aug/20:06:45:50] "GET /img.jpg" 404 -
I want to count every LIne in the file, in which 2nd last numbers of the line beginning in 2 , for example, 192.168.10.1 exist 3 times in the file, but only 2 lines of 192.168.10.1 is 200 and 1 is 404. so i want count only 2 lines
192.168.10.1 2
192.168.10.2 1
192.168.10.3 1