Path: utzoo!attcan!uunet!cs.utexas.edu!romp!auschs!d75!panda!eli From: eli@panda.uucp (Eli Taub/100000) Newsgroups: comp.unix.questions Subject: Re: ed script Summary: r file1 Keywords: ed, delete to end Message-ID: <3234@d75.UUCP> Date: 2 Jul 90 17:42:02 GMT References: <1990Jun30.060610.9287@clark.uucp> Sender: news@d75.UUCP Reply-To: eli@reed.UUCP (Eli Taub/100000) Organization: IBM AWD, Austin, TX Lines: 29 In article <1990Jun30.060610.9287@clark.uucp> ade@clark.uucp (Adrian Miranda) writes: >My apologies if this is obvious, I don't know anything about ed, and >really don't want to 8-). > >Could someone tell me how to write an ed script that will read in a >file, find the line containing a ')', delete all lines which follow, >then append another file to what remains of the first? I'm afraid it >does have to be ed, it will go on a boot floppy that doesn't have room >for much else. > >Please mail it to me, this is unlikely to appeal to anyone else. Sorry, I don't think I can email anything... > >Adrian Miranda >uunet!clark!ade The following lines should do the trick: r file1 /)/+1,$d r file2 w q _ |___ Eli Taub | | \ | (512) 838-4810 | /\/ Contractor at (AWD) IBM | I express my apinions not IBM's. / | \