ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yaron Ruckenstein" <yaron.ruckenst...@mobilitec.com>
Subject RE: Foreach and "End Of Line" delimiter
Date Mon, 27 Oct 2003 17:12:34 GMT
This works on Windows:

<project name="test" default="test" basedir="c:\tmp\4">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<property name="nl" value="&#10;"/>
   <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:PICANDET@fr.ibm.com]
Sent: Monday, October 27, 2003 11:54 AM
To: user@ant.apache.org
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message