Path: utzoo!attcan!uunet!mcvax!hp4nl!botter!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.unix.questions Subject: Re^2: Sed -- deleting to line BEFORE regexp match Message-ID: <2087@solo9.cs.vu.nl> Date: 23 Feb 89 01:08:32 GMT References: <3296@uhccux.uhcc.hawaii.edu> <957@philmds.UUCP> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 31 leo@philmds.UUCP (Leo de Wit) writes: \sed " \/^diff/{ \ : again \ /new_file1$/b del \ /new_file2$/b del \ \ (etc.) \ \ /new_fileN$/b del \ b nodel \ : del \ n ^ questionable \ /^diff/b again \ b del \ : nodel \}" Huh? From `man sed': (2)n Copy the pattern space to the standard output. Replace the pattern space with the next line of input. You don't want the pattern space on the standard output. My previous article showed a solution using sed's `-n' option. -- "Those who do not understand Henry |Maarten Litmaath @ VU Amsterdam: Spencer are condemned to reinvent DOS." |maart@cs.vu.nl, mcvax!botter!maart