#!/bin/bash
awk '($NF=="ESTABLISHED" || $NF=="TIME_WAIT" || $NF=="LISTEN"){print $6}' nowcoder.txt | sort | uniq -c | sort -n -r -k1,1 -s| awk '{print $2,$1}'

#!/bin/bash
awk '($NF=="ESTABLISHED" || $NF=="TIME_WAIT" || $NF=="LISTEN"){print $6}' nowcoder.txt | sort | uniq -c | sort -n -r -k1,1 -s| awk '{print $2,$1}'