Created
January 19, 2016 10:16
-
-
Save flyte/197c23a4d403481af0ff to your computer and use it in GitHub Desktop.
Parse Apache logs to calculate number of hits.
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
#!/bin/bash | |
cd /var/log/apache2 | |
i=`date +%d/%b/%Y` | |
j=`cat other_vhosts_access.log | grep “$i” | grep "GET / HTTP/1." | wc -l` | |
echo "No. of Apache Access Count:$j" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment