The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 06-09-2006
futurelet futurelet is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 137

Code:
awk 'BEGIN{RS=""; ORS="\n\n"}
  !/CONNECT|alter system switch logfile/'

The lines separating the paragraphs must be empty.

If the in-between lines may contain spaces or tabs:


Code:
gawk 'BEGIN{RS="\n([ \t]*\n)+";ORS="\n\n"}
 !/CONNECT|alter system switch logfile/'