The number of occurrences of ip in the shell statistics log

The format of the production access log access.log is as follows:

10.202.33.61|2016-03-01 10:01:10

10.202.33.62|2016-03-01 10:01:10

10.202.33.61|2016-03-01 10:01:10

10.202.33.62|2016-03-01 10:01:10

 

Count the number of occurrences of each ip

 

cut -d '|' -f 1 access.log |sort|uniq -c

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326713164&siteId=291194637