Created
February 8, 2015 22:03
-
-
Save coboshm/196ed76b65cad07d8d04 to your computer and use it in GitHub Desktop.
Get number of each petition access.log
This file contains 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 | |
# Author: Marc Cobos | |
FILE=test.access.log | |
types=(GET PUT DELETE HEAD POST TRACE OPTIONS CONNECT PATCH); | |
for i in ${!types[*]} | |
do | |
COUNT=`grep ${types[$i]} $FILE |wc -l`; | |
echo "$COUNT: ${types[$i]}"; | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment