Update: Yeah.. a pretty poor solution. I'd say a better bet would be standardizing the text around the dept name in the logs... So if you had something like <date><info><dept><log entry>You could do:use strict; my @depts=qw/dept1 dept2 dept3/; for(@depts){ system("grep $_ weblog >> $_.log"); }
perl -lne'system("echo \"$_\" >> $1.log")if/<info><(\w+)>/;' logfile
In reply to Re: Break up weblogs
by insensate
in thread Break up weblogs
by xorl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |