Maybe using <redirector>. Something like: <exec executable="perl" dir="${mirror.bin}" outputproperty="null.storage" error="${mirror.bin}/temp.out"> <redirector outputproperty="redirector.out" errorproperty="redirector.err" inputstring="blah before blah"> <filterchain> <linecontains> <contains value="*** ERROR"/> </linecontains> </filterchain> </redirector> </exec>
Jan > -----Ursprüngliche Nachricht----- > Von: michael sorens [mailto:[EMAIL PROTECTED] > Gesendet am: Samstag, 29. Januar 2005 22:14 > An: user@ant.apache.org > Betreff: manipulating property strings > > Is there a way to manipulate the contents of a multi-line > property string as if it were a file? > Right now I collect stderr of an exec to a temp-file > (error="filename") then read the temp-file and manipulate via > filterchain, storing into a property, as in: > > <exec executable="perl" dir="${mirror.bin}" > outputproperty="null.storage" > error="${mirror.bin}/temp.out"> > ... > </exec> > > <loadfile srcfile="${mirror.bin}/temp.out" property="run.error"> > <filterchain> > <linecontains> > <contains value="*** ERROR"/> > </linecontains> > </filterchain> > </loadfile> > > ...then deleting the temp-file. > > I'm looking for a more elegant solution. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >