#!/bin/bash

awk '/^tcp/ {status[$NF]++} END {for(i in status) print i, status[i]}' nowcoder.txt | sort -k2rn