Created
October 28, 2014 19:57
-
-
Save jspooner/81960b9184c218029f2e to your computer and use it in GitHub Desktop.
logmonitor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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