#!/bin/bash cat nowcoder.txt| grep "3306.*ESTABLISHED"| awk '{print $5}'| awk -F':' '{print $1}'| sort| uniq -c| sort -nr| awk '{print $1" "$2}'