If you wanted just to make note of the matching files, you could do: <pathconvert property="foofiles"> <path><fileset dir="."> <contains text="foo" /> </fileset></path> </pathconvert> <echo>files containing foo: ${foofiles}</echo>
If you wanted to actually write the matching text, you might do this: <echo>lines containing foo:</echo> <concat> <fileset dir="." /> <filterchain> <linecontains> <contains value="foo" /> </linecontains> </filterchain> </concat> If you needed to know which matching text came from which file I would use ant-contrib for against your fileset and check each file... HTH, Matt --- KrustyDerClown <[EMAIL PROTECTED]> wrote: > Hi, > > i dont want anything replace. :) I just want search > and (if the process find > a match) write something to a file. > > Greets Oliver > > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: <user@ant.apache.org>; <[EMAIL PROTECTED]> > Sent: Wednesday, July 27, 2005 5:18 PM > Subject: AW: Search Task in ANT > > > <replaceregexp> ? > > Jan > > >-----Ursprüngliche Nachricht----- > >Von: KrustyDerClown [mailto:[EMAIL PROTECTED] > >Gesendet: Mittwoch, 27. Juli 2005 13:53 > >An: user@ant.apache.org > >Betreff: Search Task in ANT > > > >Hello, > > > >i search an ANT Task for search in a file and write > (if the > >search find a spezial term) a notice in a file. > > > >Provide ANT for this work any simple task or must i > use the > >replace task ? > > > >Thank you for your support. > > > >Greets Oliver > > > > --------------------------------------------------------------------- > 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] > > __________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]