按状态统计tcp连接数量& sort使用

netstat -nt | awk '{print $6}' | sort | uniq -c | sort -n -k 1 -r

编程技巧