Thanks for the answers. Going to answer a couple comments, still going through the suggestions.

I know what i need the script to do. Parse out lines with specefic error messages(listed in an external text file), and look for corresponding uptime messages and append the date and time of that to the the original parsed line, and mail it.

Example of what i mean by corresponding line:
A error may get logged that says, for example, "SQL server is down", right now this would get parsed out fine, and in the right format. Later on an error message may come in that says "SQL server is up". This may not come in until after the downtime was logged and the syslog was cleared. I need to be able to have the script know to look for that message, and append the date and time of that message to the "sql server is down" event that was already parsed out. There will be dozens of downtime messages, and each with a different uptime event.

Now, everything works but the whole uptime aspect. Nothing has been done there, and my feeble coding skills are preventing me from getting much further.

I appreciate the help.


In reply to Re: comma delimited, syslog parsing by jeff061
in thread comma delimited, syslog parsing by jeff061

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.