Created
August 24, 2012 11:18
-
-
Save brokendish/3449328 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 | |
dig $1 +noall +answer | | |
awk '{print($5)}'| | |
xargs -I{} grep {} /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