#!/bin/bash awk '{split($5,temp,":");if(NR>1 && $1 == "tcp") a[temp[1]]+=1}END{for(x in a) print x,a[x]}' nowcoder.txt | sort -n -r -k 2