As a slightly unweildy one-liner:
perl -ne"if(/processed/){ print($last),undef($last) if $last; print;}else{$ +last=$_}" junk.dat **start xyz File1 processed File2 processed **start wert File3 processed File4 processed
In reply to Re: How to print a matching line and one line above it?
by BrowserUk
in thread How to print a matching line and one line above it?
by vbynagari
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |