#!/afs/athena/contrib/perl/perl

while(<>){
    split;
    ($day, @rest) = split(/\//, substr($_[3], 1));
    if($day != $lday){
	close(LOGCHUNK);
	open(LOGCHUNK, ">/afs/sipb/project/www/logs/$day");
    }
    print LOGCHUNK $_;
    $lday = $day;
}
