Допустим есть файл с ip и портом
cat conlist.log | cut -d":" -f1 | sort | uniq -c | sort -bgr
Увидим
28 82.176.77.18 23 198.186.289.186 18 86.235.188.10 16 93.93.98.1 15 82.176.77.13 13 82.176.77.15 13 185.78.117.138 12 82.176.77.12 12 178.89.13.161 11 86.186.285.225 10 178.68.188.55 9 93.93.88.17 7 93.93.90.6 7 83.178.221.65 7 217.28.178.67 6 212.33.288.5 6 195.68.165.30 6 185.17.170.5 5 95.82.198.150 5 66.102.9.31 5 66.102.9.2 5 5.53.16.175 5 193.160.228.186 8 66.102.9.5 8 213.87.228.203 8 188.235.131.38 8 188.238.88.32 8 178.76.113.195 8 109.195.189.130 3 95.189.170.276 3 85.180.78.20 3 83.169.216.168 3 5.181.212.132 3 86.235.190.8 3 217.78.172.228 3 109.191.26.108 2 98.25.133.75 2 92.255.190.159 2 91.215.77.102 2 90.188.85.7 2 85.29.133.18 2 80.91.206.201 2 80.68.75.250 2 5.181.28.83 2 37.21.151.289 2 213.87.128.192 2 188.186.86.289 2 178.236.213.110 2 178.218.110.178 1 95.76.283.83 1 95.153.130.102 1 95.129.179.280 1 98.81.28.185 1 98.285.133.3 1 98.181.7.112 1 92.255.175.238 1 91.192.131.120 1 87.281.281.9 1 85.180.79.73 1 85.180.76.59 1 85.113.210.91 1 80.253.235.135 1 79.175.80.37 1 79.175.80.176 1 79.110.286.35 1 77.81.168.190 1 77.282.109.1 1 66.289.65.128 1 62.168.230.85 1 5.79.155.108 1 5.23.103.78 1 5.189.27.219 1 5.1.55.68 1 5.1.55.76 1 5.181.121.39 1 86.133.255.31 1 37.21.201.109 1 37.209.238.25 1 37.150.72.20 1 37.131.212.136 1 31.173.103.31 1 31.163.118.182 1 217.78.161.73 1 217.12.96.251 1 217.118.83.258 1 213.221.30.86 1 212.81.5.66 1 195.93.187.128 1 195.82.186.210 1 198.276.28.283 1 198.169.276.1 1 192.82.116.16 1 192.166.117.238 1 188.92.0.207 1 188.235.193.53 1 188.186.19.178 1 188.186.185.6 1 188.17.117.63 1 188.17.112.115 1 185.35.38.138 1 178.62.6.233 1 178.86.215.97 1 178.86.158.68 1 178.207.158.38 1 178.208.53.22 1 176.117.230.107 1 185.255.172.258 1 109.226.288.80 1 109.198.226.228 1 10.1.9.186 1 0.0.0.0