题解 | #nginx日志分析2-统计某个时间段的IP#
nginx日志分析2-统计某个时间段的IP
http://www.nowcoder.com/practice/ddbdd73859fa4fd48bbae7dd2e55f4b9
#! /usr/bin/env bash
########################################################
#
#
########################################################
function solution_1() {
grep -e"23/Apr/2020:[20-23]:*" nowcoder.txt | awk -F"-" '{print $1}' | sort | uniq | wc -l
}
solution_1