I have to first apologize if this has been answered in another thread, but I couldn't find it. I also need to preface my post by saying that I am NOT a programmer, so I may ask "stupid" questions. I have started Perl self-learning, but I need to get a couple of scripts up right now.
This is what I need to do:
Parse a Perforce log file (plain text) for specific words/text (e.g. btree corrupt), and send an email if such text is encountered. If it makes a difference, the log file is typically @100MB, and it resides on a remote server. Here is an example of the contents of the log:
Perforce server info:
2007/06/20 23:37:18 pid 1116 completed .016s
Perforce server info:
2007/06/20 23:37:18 pid 1116 jmihalik@mstudio-guadalupe-build 10.0
+.44.165 [unknown/v56] 'user-fstat C:\builds\MStudio\Products\MStudioC
+ore\Dev\Guadalupe\Exports\VS2005\Tests\Integration\TestFiles\Output\V
+isaOutputTask.h'
Perforce server info:
2007/06/20 23:37:18 pid 1116 completed .000s
Perforce server info:
2007/06/20 23:37:18 pid 1116 jmihalik@mstudio-guadalupe-build 10.0
+.44.165 [unknown/v56] 'user-reopen -t text+w C:\builds\MStudio\Produc
+ts\MStudioCore\Dev\Guadalupe\Exports\VS2005\Tests\Integration\TestFil
+es\Output\VisaOutputTask.h'
Perforce server info:
2007/06/20 23:37:18 pid 1116 completed .000s
As I stated earlier, I am a noob, and I have done the super search, but the answers that I find assume that I am already a programmer. I appreciate any help that people can provide, and I especially appreciate people's patience as I learn.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.