ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: parse file in ant and create new file
Date Thu, 17 Mar 2005 20:36:31 GMT
Looks like a filtered <concat> to me.

-Matt

--- Radha Sangal <Radha.Sangal@pega.com> wrote:
> Is there any task in ant to simulate this simple
> code of java , reading
> one file and extracting content to write into
> another... in integrate
> this small java code , I will have to do lot of
> work.. was wondering if
> its possible through ant itself 
> 
>  
> 
> BufferedReader in = new BufferedReader(new
> FileReader("C:\\WrapperCabInstaller.log"));
> 
>                     BufferedWriter out = new
> BufferedWriter(new
> FileWriter("C:\\Cab_version_information.log"));
> 
>                     String str;
> 
>                     while ((str = in.readLine()) !=
> null) {
> 
>                         if(str.indexOf("[java] Cab")
> != -1){
> 
>                                    
> System.out.println(str);
> 
>                                     out.write(str);
> 
>                                      out.newLine();
> 
>                        }
> 
>                         else
> if(str.indexOf("version") != -1)
> 
>                          {
> 
>                                    
> System.out.println(str);
> 
>                                     out.write(str);
> 
>                                      out.newLine();
> 
>                        }
> 
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message