Skip to content

Instantly share code, notes, and snippets.

@jspooner
Created October 28, 2014 19:57
Show Gist options
  • Save jspooner/81960b9184c218029f2e to your computer and use it in GitHub Desktop.
Save jspooner/81960b9184c218029f2e to your computer and use it in GitHub Desktop.
logmonitor
declare -i cnt
last_cnt=0
while true
do
    (( cnt = $(grep met=618 access.log | wc -l) ))
    ((difference = $cnt - $last_cnt))
    (( last_cnt=$cnt ))
    echo $difference
    sleep 60
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment