Path: utzoo!mnetor!uunet!husc6!bloom-beacon!mit-eddie!ll-xn!ames!pacbell!att-ih!chinet!les From: les@chinet.UUCP (Leslie Mikesell) Newsgroups: comp.unix.wizards Subject: Re: A little help with SED please - cla Message-ID: <4910@chinet.UUCP> Date: 21 Apr 88 22:17:15 GMT References: <5490@sigi.Colorado.EDU> <142700030@occrsh.ATT.COM> Reply-To: les@chinet.UUCP (Leslie Mikesell) Distribution: na Organization: Chinet - Public Access Unix Lines: 12 > >:I need an sed line (or some gory pipeline) to extract the data between > ^^^^^^^^^^^^^^^^^^^^^^ >:BEGIN and END. How about: sed -n -e '/BEGIN/,/END/p' |sed -e '/BEGIN/d' -e '/END/d' perhaps with ^BEGIN$ if you want to force matches to full lines or changing the second sed to s/BEGIN// if you don't. Les Mikesell