cat file and parse output

Hello,

I'm new to shell scripting and did a search on the forum to what I want to do but couldn't find anything.

I have about 9 routers that outputs to 1 syslog file daily named cisco.year.mo.date.log ex: cisco.2009.05.11.log

My goal is to make a parsing script that cats today's syslog file, grep the router's hostname in the file, and output it to a text file with today's date and hostname, and continue to append to that file until the next day. I intend to make this script run every 30 minutes which is something I know how to do via the crontab. If a router doesn't generate a syslog file then skip that hostname. This is so it will be easier for me to see if that router generated a syslog file and what happened to it. Any help or guidance will be greatly appreciated

Thanks in advance

Why not just do it once a day? Anyway, you will have to show a couple of actual lines from the logfile, because we have to know the time & date of the entry to be able to reject yesterday's entries.

Splitting them out is easy, finding the right ones is not so easy.

Here is an example output, if I was to do a simple grep of the hostname it gives me the entire line, so I'm not worried about that. Thanks!:

2009-05-11T14:16:03.000-04:00 dalltx-rtr1(xx.xx.xx.xx) [local4.crit] sipd[3dfbb
b30] OSPF State Changed!
2009-05-11T14:16:12.000-04:00 dalltx-rtr2(xx.xx.x.xxx) [local4.crit] sipd[3dfbb
a30] OSPF State Changed!
2009-05-11T14:16:15.000-04:00 detmi-rtr2(xx.xx.x.xxx) [local4.crit] sipd[3dfbb
b30] OSPF State Changed!