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 <KrustyDerClown@gmx.de> 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: <Jan.Materne@rzf.fin-nrw.de>
> To: <user@ant.apache.org>; <KrustyDerClown@gmx.de>
> Sent: Wednesday, July 27, 2005 5:18 PM
> Subject: AW: Search Task in ANT
>
>
> <replaceregexp> ?
>
> Jan
>
> >-----Ursprüngliche Nachricht-----
> >Von: KrustyDerClown [mailto:KrustyDerClown@gmx.de]
> >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:
> 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
>
>
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
|