vbynagari has asked for the wisdom of the Perl Monks concerning the following question:
How to print a matching line and one line above it?
Can some one share me a quick way to do it?
this is what is in the file:
**start abc
**start adl
**start xyz
File1 processed
File2 processed
**start zxcv
**start wert
File3 processed
File4 processed
and I want the new file to be:
**start xyz
File1 processed
File2 processed
**start wert
File3 processed
File4 processed
your help is appreciated. thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to print a matching line and one line above it?
by BrowserUk (Patriarch) on Apr 20, 2011 at 00:32 UTC | |
by vbynagari (Initiate) on Apr 20, 2011 at 00:43 UTC | |
by BrowserUk (Patriarch) on Apr 20, 2011 at 00:56 UTC | |
|
Re: How to print a matching line and one line above it?
by locked_user sundialsvc4 (Abbot) on Apr 20, 2011 at 14:27 UTC |