Hi all,
I seek your help in solving probably a silly problem.
I do a grep on my root and I need to parse out results as:
$FileName, $Path.
I used  $grepResult=~/(\w+[\.\w+]+)(\:)/; and took $1,$` for file and path respectively.
Now I face problem when certain file names are encountered like:
/tools/sav/GlobalPS.pl.2005-04-14
/tools/TitleLiner.cgi-ELFE-fixed etc.
$term=<some text input to be searched for>; $fn="../ -depth -type f | xargs grep -i -n "."$term"; $output = qx/find $fn /;
$output is written to a file to be later read and parsed by perl.
I used find to look recursively as I work on Solaris
It would be great if someone to tell me how to overcome
slowness of 'find | xargs grep' (or any other recurssive grep) on Solaris.

Thanking all in advance!

In reply to Parse grep result by vsailas

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.