sed: remove matching lines along with each preceding line
sed -n '$!N;/\nPATTERN/!{P;D}'
Written by Richard Howard
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sed
Authors
Related Tags
#sed
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#