ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.ke...@pd.admin.ch
Subject AW: search for words in a file
Date Thu, 18 Oct 2001 14:11:04 GMT
Well,

What I propose is really not for beginners. Make your own task (take the
documented example SimpleTask.java) and make a simple search routine. You
have to set up three main attributes: The root path, the specific word and a
text file to save the results in. OroMatcher would be easier to use. Try it!
In the patternset you can add includesFile to include the file in a fileset.
Have a look at the attachment to make your own task...


It's used like this:
SearchTask d:\root d:\root\matches.txt someIdentifier 


Thomas Kerle
 
Informatikdienste

-----Urspr√ľngliche Nachricht-----
Von: Christine.Woon@nurun.com [mailto:Christine.Woon@nurun.com] 
Gesendet: Mittwoch, 17. Oktober 2001 15:31
An: ant-user@jakarta.apache.org
Betreff: search for words in a file

Hi guys,

I am new at Ant, and was curious if there is any task to search for a
specific word i.e 'main' in a file.
If the word doesn't exist then include it in a fileset, otherwise ignore
it.

Thank you

-Christine


Mime
View raw message