#!/bin/sh
cd /data/webserver/nginx/logs
read -p "Please Enter setime(eg. '10-15'):" setime
if [ ! $setime ];
 then
   echo "Input format error"
   exit 0
fi
sed -n "/2020-'${setime} '00:00:00/,/2020-'${setime} '23:59:59/p" xxxx_access.log | grep Baiduspider >> "/tmp/2020-${setime}.log"

关注友儿不迷路

Last modification:October 19th, 2020 at 08:53 am
如果觉得我的文章对你有用,请随意赞赏