Path: utzoo!attcan!uunet!lll-winken!ames!elroy!cit-vax!jerbil From: jerbil@cit-vax.Caltech.Edu (Stainless Steel Gerbil [Joe Beckenbach]) Newsgroups: comp.unix.questions Subject: Re: Sed -- deleting to line BEFORE regexp match Message-ID: <9725@cit-vax.Caltech.Edu> Date: 23 Feb 89 19:20:09 GMT References: <3296@uhccux.uhcc.hawaii.edu> Reply-To: jerbil@cit-vax.UUCP (Stainless Steel Gerbil [Joe Beckenbach]) Organization: California Institute of Technology Lines: 25 In his article Robert Lupton (lupton@uhccux.uhcc.hawaii.edu) writes: >I have a patch generator (a script using diff -c, of course), and I want >to exclude the patches for certain files. So I want to delete all lines >from > >diff -c -r old_file new_file >... >diff -c -r OLD_FILE NEW_FILE > >(but keeping the second diff line), using sed. Can you spare an extra pass on it? If so, just duplicate the last line and then delete from the first to the second inclusive. -- Users I'd like to see: [-: | Joe Beckenbach Postmaster@link.L5.edu | jerbil@cit-vax.caltech.edu gorby@cparty.kremlin.gov.cccp | Caltech 256-80, Pasadena CA 91125