题解 |#netstat练习2#
netstat练习2-查看和3306端口建立的连接
https://www.nowcoder.com/practice/534b95941ffb495b9ba57fbfc3cd723a
#!/bin/bash grep ESTABLISHED |awk -F ' ' '{print $5}'|grep 3306|awk -F ':' '{arr[$1]++}END{ for (i in arr){ printf "%d %s \n",arr[i],i } }'|sort -nr -k1