[prog] spliting up a java compolation file

Sue Stones suzo at spin.net.au
Sat Mar 13 15:16:04 EST 2004


On Sat, 13 Mar 2004 11:42 am, Sue Stones wrote:
> On Sat, 13 Mar 2004 03:23 am, Miguel Ibarra wrote:
> > But... it will be far easier to simply use csplit(1) (split a file into
> > sections determined by context lines) :).
>
> Thanks Miguel, thats really helpfull. I'll look up the man page for csplit.

I've read the man page, and the info page.  csplit doesn't look powerfull 
enough to do this.  Though there were parts of these pages that I didn't 
understand,  (it didn't include examples to show how to do it).

The basic problems included ...

1)  it only split the file into 2, not every time the pattern occured.
2)  I couldn't understand how to change the prefix.
3)  It doesn't seem possible to name the file something usefull, since there 
are very specific names for java files this is important on 2 accounts.

More complex problem is ....
I really need to copy the #include lines into every file.

ANy help solving these problems would be usefull.  Though I suspect that awk 
is going to be the right tool for this job.  But if anyone knows/thinks 
better, please say so.  Thanks

sue





More information about the Programming mailing list