perl -ne 'sub BEGIN {$l="";}$l=$_, next unless /ERROR/;print /^[^12]/ +? "$l$_" : $_;$l=$_;' some.log
Johngg
In reply to Re^4: need to extract top and bottom lines...
by johngg
in thread need to extract top and bottom lines...
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |