Thanks for the help...

i have learnt more things after looking at it..

i guess there is some misunderstanding under point 7. Actually i would like my script to count the number of time an error occur for today. The count should be by individual error. Think a example will be good. Please have a look at the below

let say today date is 24th Feb and in /var/abcLogs:

23 Feb error1 found. please check => this is not what i want as the date is today

23 Feb error1 found. please check => this is not what i want as the date is today

24 Feb error1 found. please check => this what i want as the line has today date and either errror1, 2 or 3

24 Feb error1 found. please check => this what i want as the line has today date and either errror1, 2 or 3

24 Feb error3 found. please check => this what i want as the line has today date and either errror1, 2 or 3

24 Feb error2 found. please check => this what i want as the line has today date and either errror1, 2 or 3

hence, the output result will show me:

error1 found 2 for today

error2 found 1 for today

error3 found 1 for today


In reply to Re^4: search log file with multiple word and count number of success by steadybompipi
in thread search log file with multiple word and count number of success by steadybompipi

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.