Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!hp4nl!botter!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.unix.questions Subject: Re: Sed -- deleting to line BEFORE regexp match Message-ID: <2066@solo10.cs.vu.nl> Date: 20 Feb 89 19:16:36 GMT References: <3296@uhccux.uhcc.hawaii.edu> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 19 lupton@uhccux.uhcc.hawaii.edu (Robert Lupton) writes: \... \Also, I couldn't make this work using csh (it complains about unmatched "), \only with the Bourne shell. Welcome to csh! Its quoting conventions are a BIT different, RTFM. \Any comments? What I want is "/^diff new_file/,(/^diff/-1)d", but that \ain't sed. sed -n '/^diff new_file/{ :L n /^diff/!b L } p' -- "Those who do not understand Henry |Maarten Litmaath @ VU Amsterdam: Spencer are condemned to reinvent DOS." |maart@cs.vu.nl, mcvax!botter!maart