You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by de...@epiphany.com on 2001/05/09 23:31:21 UTC
How to concatenate files in ant
I need to do something like
type a.txt b.txt c.txt >merged.txt
I tried the follwoing code but it doesn't seem to be working. Has anyone
done something
like that before? Thx.
<copy tofile="merged.txt">
<fileset dir="." >
<patternset>
<include name="aa"/>
<include name="bb"/>
<include name="cc"/>
</patternset>
</fileset>
</copy>
Re: How to concatenate files in ant
Posted by Chris Winters <cw...@optiron.com>.
* debic@epiphany.com (debic@epiphany.com) [010509 18:08]:
> I need to do something like
>
> type a.txt b.txt c.txt >merged.txt
>
> I tried the follwoing code but it doesn't seem to be working. Has anyone
> done something
> like that before? Thx.
>
> <copy tofile="merged.txt">
> <fileset dir="." >
> <patternset>
> <include name="aa"/>
> <include name="bb"/>
> <include name="cc"/>
> </patternset>
> </fileset>
> </copy>
I wrote a task to do this and would be happy to make it
available. I've been using it for months without a problem to create
EJB XML descriptors from lots (!) of individual XML files. The task
could probably written more elegantly, but I've only been doing Java
for a few months now :-)
Chris