#!/bin/bash cat nowcoder.txt | grep -i -e '3306' | grep -i 'established' | grep -E -i '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | awk '{print $5}' | awk -F ':' '{print $1}' | sort | uniq -c | sort -nrk 1 | awk '{print $1,$2}'