Skip to content

Instantly share code, notes, and snippets.

@ryuichiueda
Created April 18, 2015 06:40
Show Gist options
  • Save ryuichiueda/862b1c9f7b5b5c741f80 to your computer and use it in GitHub Desktop.
Save ryuichiueda/862b1c9f7b5b5c741f80 to your computer and use it in GitHub Desktop.
福岡会場へ・・・
ueda@tencore:~/tmp/nasa$ zcat access_log.nasa.gz | awk '{print $4,$0}' |
sed 's/^\[//' | awk '{gsub(/[\/:]/," ",$1);print}' |
awk '{$2=$2=="Jul"?"07":$2;$2=$2=="Aug"?"08":$2;print}' |
sed 's;^\(..\) \(..\) \(....\) \(..\) \(..\) \(..\);\3\2\1 \4\5\6;' > access_log
ueda@tencore:~/tmp/danger$ zcat access.log.shellshock.gz | awk '{print $4,$0}' |
sed 's/^\[//' | awk '{gsub(/[\/:]/," ",$1);print}' |
sed -e 's/Sep/09/' -e 's/Oct/10/' -e 's/Nov/11/' -e 's/Dec/12/' |
sed 's;^\(..\) \(..\) \(....\) \(..\) \(..\) \(..\);\3\2\1 \4\5\6;' > danger_log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment