in reply to Re^2: get few lines from a file
in thread get few lines from a file
That said, here is some code that will do the job, but I'm hoping you will try to understand how it works, and if you have difficulty with that, please post specific questions explaining how much you have understood, and what part you have difficulty with.
Note - the only reason the code contains a "push @arr" is because you originally requested the contents be placed in an array.perl -ne 'push @arr,$_ if $x;$x||=m/^Status of the log/}{print for @a +rr' Your-file.name
When in doubt, mumble; when in trouble, delegate; when in charge, ponder. -- James H. Boren
|
|---|