#!/bin/bash awk -F ' - - ' '/23\/Apr\/2020/{arr[$1]++}END{ # 使用正则匹配/23/Apr/2020/ for (i in arr){ print arr[i] ,i } }'| sort -k 1 -r