Xref: utzoo comp.unix.wizards:25508 comp.unix.shell:2139 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!wuarchive!uunet!convex!usenet From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.unix.wizards,comp.unix.shell Subject: Re: easy for some Message-ID: <1991May09.185400.21746@convex.com> Date: 9 May 91 18:54:00 GMT References: <6686@male.EBay.Sun.COM> <574@appserv.Eng.Sun.COM> <1991May9.153351.1754@colorado.edu> Sender: usenet@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Followup-To: comp.unix.shell Organization: CONVEX Software Development, Richardson, TX Lines: 24 Nntp-Posting-Host: pixel.convex.com From the keyboard of lewis@tramp.Colorado.EDU (LEWIS WILLIAM M JR): :In article <574@appserv.Eng.Sun.COM> lm@slovax.Eng.Sun.COM (Larry McVoy) writes: :>matthew@gizmo.UK.Sun.COM (Matthew Buller - Sun EHQ - MIS) writes: :>> problem: to extract text between start and end patterns in a file :... more problem description :>/bin/sh, usage shellscript start_pat stop_pat [files...] :> :... complex shell and perl programs to do : : sed -n '/pattern1/,/pattern2/p' source_file > new_file nope -- you included the endpoints. i didn't see the original posting, so i don't know whether it's possibly to have multiple sets of /pat1/,/pat2/ areas in the file. if so, the 1,/pat1/d /pat2,$d posting i just saw won't work. followups have been redirected. this isn't particularly wizardly. --tom -- Tom Christiansen tchrist@convex.com convex!tchrist "So much mail, so little time."