ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob van Oostrum" <li...@springwellfarms.ca>
Subject RE: Foreach and "End Of Line" delimiter
Date Mon, 27 Oct 2003 16:40:51 GMT
I would say it depends on the platform you're running on ... Unix-type files
use \n, Windows-type files use \r\n (or \n\r, I can never remember). Of
course, you could write a simple program that reads the contents of a file
into a String ... and then you parse for whatever's between 'line1' and
'line2'

cheers,
Rob "why look something up if you can write a program to answer the question
for you"

> -----Original Message-----
> From: Laurent Picandet [mailto:PICANDET@fr.ibm.com]
> Sent: October 27, 2003 4: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