Skip to content

Instantly share code, notes, and snippets.

@oremj
Created November 18, 2009 20:18
Show Gist options
  • Save oremj/238206 to your computer and use it in GitHub Desktop.
Save oremj/238206 to your computer and use it in GitHub Desktop.
VHOST=foo.com
LOGDIR=/data/stats/logs/im-log01/foo.com
for i in $(ls access_2009-11-1{0,1,2,3,4,5,6,7}*gz)
do
zgrep -E "^[0-9]+.[0-9]+.[0-9]+.[0-9]+ $VHOST" $i > $LOGDIR/${i%%.gz}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment