netstat -n | awk '/^tcp/ {print $NF}' | sort | uniq -c | sort -nr
----------------------
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
时间: 2024-11-02 20:49:51
netstat -n | awk '/^tcp/ {print $NF}' | sort | uniq -c | sort -nr
----------------------
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'