ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lyndon Samson <>
Subject Re: (newbie) how insert content of one file into middle of another one
Date Fri, 18 Jul 2003 15:00:08 GMT
Hello Monika,

Thursday, July 17, 2003, 5:50:08 PM, you wrote:

MA> Hi,

MA> I have a file that gets generated by one of the ant tasks (and I have
MA> no control over this task, so I can't modify it). Once the first file
MA> gets generated, I need to read content of another file and insert it
MA> into the first one at specific location (definitively not at the end of
MA> beginning so I can't concatenate them).
MA> e.g: 
MA> file 1 has 3 lines

MA> line1
MA> line2
MA> line3

MA> file 2 has 2 lines
MA> lineA
MA> lineB

MA> As a final result I want to have in file 1

MA> line1
MA> line2
MA> lineA
MA> lineB
MA> line3

MA> Can someone provide me with an example how to do it?

Sounds like you are best off calling the sed editor externally.
Otherwise you could probably do it with a <script>.

MA> Monika

MA> __________________________________
MA> Do you Yahoo!?
MA> SBC Yahoo! DSL - Now only $29.95 per month!

MA> ---------------------------------------------------------------------
MA> To unsubscribe, e-mail:
MA> For additional commands, e-mail:

Best regards,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message