teddy6507 has asked for the wisdom of the Perl Monks concerning the following question:
i would like to grep all the lines between #ERRROR and cellpattern.(including both #ERROR and cellpattern) next, i would like to print out each pattern outside of my foreach loop(used to loop all files) so it will becomes like this:See asfdfdfd #ERRORS pattern to grep pattern to grep CELLS cellpattern abcdef gfghtht
output: bla bla bla ( different result from other code) bla bla bla ( different result from other code) bla bla bla ( different result from other code) #ERRORS <------------ from file F1 pattern to grep pattern to grep CELLS cellpattern #ERRORS <------------ from file F2 pattern to grep pattern to grep CELLS cellpattern the way my code is written print them out as they parse the line which + is not what i want . example of my current result bla bla bla #ERRORS <------------ from file F1 pattern to grep pattern to grep CELLS cellpattern bla bla bla bla #ERRORS <------------ from file F2 pattern to grep pattern to grep CELLS cellpattern
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: print content of array individually after parsing multiple input files
by Anonymous Monk on Dec 10, 2014 at 02:38 UTC | |
by teddy6507 (Initiate) on Dec 10, 2014 at 03:05 UTC | |
by Anonymous Monk on Dec 10, 2014 at 20:16 UTC | |
|
Re: print content of array individually after parsing multiple input files
by Laurent_R (Canon) on Dec 10, 2014 at 07:31 UTC | |
by Anonymous Monk on Dec 10, 2014 at 08:06 UTC | |
|
Re: print content of array individually after parsing multiple input files
by RonW (Parson) on Dec 10, 2014 at 22:02 UTC |