ed script

Eli Taub/100000 eli at panda.uucp
Tue Jul 3 03:42:02 AEST 1990


In article <1990Jun30.060610.9287 at clark.uucp> ade at 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.      /   |  \



More information about the Comp.unix.questions mailing list