This works on Windows:
<project name="test" default="test" basedir="c:\tmp\4">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<property name="nl" value=" "/>
<target name="test">
<loadfile property="myFile" srcFile="test.lst" />
<foreach list="${myFile}" delimiter="${nl}" param="myParam" target="line"/>
</target>
<target name="line">
<echo message="${myParam}"/>
</target>
</project>
-----Original Message-----
From: Laurent Picandet [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 11:54 AM
To: [EMAIL PROTECTED]
Subject: Foreach and "End Of Line" delimiter
Hello,
I loaded a file <file1> in my build like :
line1
line2
line3
<loadfile property="myFile" srcFile="file1" />
I need looping on each line.
I'm using foreach but I didn't find the correct end of line delimiter :
(I'tried "/n", "//n")
<foreach list="${myFile}" delimiter="?????" param="myParam" target
="aTarget"/>
Thank's for advance
Laurent
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]