tc_blr has asked for the wisdom of the Perl Monks concerning the following question:
How can i store the output of a system grep command in a perl array?
I am supposed to read a file that has a lot of lines. Few lines start with top - 00:35:18 up... I need to store all the occurances of times like 00:35:18 in a n array.
There are also a few more places where times like these are present. But i need only those occurances that start with top - 00:35:18 up...
The grep that I am currently using is grep -i "top-" filename | awk '(print $3)'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Storing system grep's output to an array in perl
by rjt (Curate) on Mar 07, 2013 at 12:26 UTC | |
|
Re: Storing system grep's output to an array in perl
by rnewsham (Curate) on Mar 07, 2013 at 11:41 UTC | |
by SuicideJunkie (Vicar) on Mar 07, 2013 at 19:03 UTC | |
|
Re: Storing system grep's output to an array in perl
by arnaud99 (Beadle) on Mar 07, 2013 at 11:52 UTC | |
|
Re: Storing system grep's output to an array in perl
by vinoth.ree (Monsignor) on Mar 07, 2013 at 11:32 UTC | |
|
Re: Storing system grep's output to an array in perl (perlfaq8)
by Anonymous Monk on Mar 07, 2013 at 11:36 UTC | |
by Anonymous Monk on Mar 07, 2013 at 11:37 UTC | |
|
Re: Storing system grep's output to an array in perl
by Anonymous Monk on Mar 12, 2013 at 10:59 UTC | |
|
Re: Storing system grep's output to an array in perl
by Anonymous Monk on Mar 12, 2013 at 11:01 UTC |