Hello,
You could write a simple script and call it from <exec>. The script could
assume its first argument is the target file and all subsequent arguments
are the files that should be appended to the target file. On UNIX, it
could be only two lines of code:
#!/bin/sh
target_file=$1
shift
cat $* > $target_file
<exec excutable="append_files.sh">
<arg value="target_file" />
<arg value="file1" />
<arg value="file2" />
<arg value="file3" />
</exec
You could do this on UNIX without an external script but you would have to
execute the entire command line through /bin/sh -c "cat file1 file2 file3
>target_file".
<exec executable="/bin/sh">
<arg line="-c "cat file1 file2 file3 >target_file"" />
</exec>
Note the use of the " entity for specifying literal double quotes.
On Windows NT/2000:
<exec executable="cmd">
<arg value="/c" />
<arg value="copy" />
<arg value="file1+file2+file3" />
<arg value="target_file" />
</exec>
With Ant 1.4, it's a little easier as you could set the attribute
vmLauncher="false" which will run the executable through cmd.exe on
NT/2000 or command.com on Windows 9x.
<exec executable="copy">
<arg value="file1+file2+file3" />
<arg value="target_file" />
</exec>
Hope this helps,
-Bill
Cyriaque Dupoirieux wrote:
>
> Hello,
>
> I need to concat several files into one file.
>
> How can I do this with Ant 1.3 ?
>
> Thank you for your help,
> Regards,
>
> Cyriaque DUPOIRIEUX,
> --
> Cyriaque Dupoirieux <mailto:[EMAIL PROTECTED]>
> PCO Technologies
> Burolines - 2 ter rue Marcel Doret
> 31700 Blagnac
> T�l : 05.34.60.44.13 - Fax : 05.34.60.44.10
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>