#! /bin/bash cat nowcoder.txt | grep "tcp" | awk -F ":" '{print $(NF-1)}' | awk '{print $2}' | sort | uniq -c | sort -nk 1 -r | awk '{print $2" "$1}'