ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dimitris Mouchritsas <dimitris.mouchrit...@eurodyn.com>
Subject Re: Can Ant Edit/replace some words in a file
Date Wed, 20 Feb 2008 13:44:26 GMT
Alec Fernandez wrote:
> Just be careful if you are using filterchain/filterreplace on binary files.  Encoding
issues can end up transcoding some bytes in binary files.  Much has been written on this topic
and I would pay close attention.
>
> -alec
>
> -----Original Message-----
> From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
> Sent: Wednesday, February 20, 2008 8:33 AM
> To: user@ant.apache.org
> Subject: AW: Can Ant Edit/replace some words in a file
>
> <copy>
>   <filterchain>
>
>
> Jan
>
>   
>> -----Urspr√ľngliche Nachricht-----
>> Von: Sann Maung [mailto:yangontha55sg@yahoo.com]
>> Gesendet: Mittwoch, 20. Februar 2008 14:30
>> An: Ant Users List
>> Betreff: Can Ant Edit/replace some words in a file
>>
>> Hi,
>>
>> I am using Ant to copy some files (eg. program files like template
>> program).
>> Then I want to replace some keywords inside the file with another
>> word.
>>
>> Can I use Ant to do it?
>>
>> If possible please guide me.
>>
>> What I am thinking is to change the words with (sed) and use Ant to
>> run that (sed). But I am not sure.
>>
>> rgds,
>>
>>
>>
>>
>>
>> ______________________________________________________________
>> ______________________
>> Looking for last minute shopping deals?
>> Find them fast with Yahoo! Search.
>> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>>
>> ---------------------------------------------------------------------
>> 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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>   
Also try to keep the filtered files few because a good advice is to use 
overwrite="true" in the copy task. If you don't use overwrite you could 
be changing the filters file and the changes won't be copied over, 
because ant sees the dates are ok between the original file and the 
destination file (it doesn't check the date on the filter file).

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message