Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!ncar!noao!arizona!sham From: sham@arizona.edu (Shamim Pogner Mohamed) Newsgroups: comp.unix.questions Subject: Re: A little help with SED please - clarifications. Message-ID: <5061@megaron.arizona.edu> Date: 21 Apr 88 00:58:08 GMT References: <5490@sigi.Colorado.EDU> Distribution: na Organization: U of Arizona CS Dept, Tucson Lines: 27 Summary: solution? In article <5490@sigi.Colorado.EDU>, murillo@sigi.Colorado.EDU (Rodrigo Murillo) writes: > I need an sed line (or some gory pipeline) to extract the data between > BEGIN and END. Here's a script that seems to work: (to be run as: sed -n -e script) ----------------------------------------------------------------------------- s/BEGIN// t nums b : nums n s/END// t p b nums ----------------------------------------------------------------------------- I was going to e-mail but thought this solution is rather kludgy. Does someone have a nice elegant solution? Yes, I know it can be done in awk etc.... -- Shamim Mohamed, Dept. of Computer Science, U of Arizona, Tucson AZ 85721 (602) 621-4891 {ihnp4,allegra,cmcl2...}!arizona!sham | sham@arizona.edu