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 -->
  #4 (permalink)  
Old 01-06-2009
frostmourn frostmourn is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 8

Code:
sed -n '/\[START1\]/{:a;N;/\[END1\]/!ba;s/\n[^\n]\+$//;p}' filename