#!/bin/bash yesterday="$( \date -u +%Y-%m-%d -d yesterday)" echo -e "${yesterday}\t$( grep -Ec "${yesterday}T.*Sending request to" /home/hpr/logs/naughty-ip.txt )" >> /home/hpr/hub/hpr_ccdn_stats.tsv