Created
February 25, 2012 08:50
-
-
Save brokendish/1907396 to your computer and use it in GitHub Desktop.
ホスト名からApacheログの調査をする
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 | |
grep `dig $1|grep -A 1 'ANSWER SECTION'|tail -1|awk '{print($5)}'` /var/log/apache2/access_all.log | | |
awk 'BEGIN{FS="\""}{print $2}' | | |
sort | | |
uniq | | |
egrep -v "対象外文字1|対象外文字2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment