Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

RE: Can Ant Edit/replace some words in a file

Alec Fernandez

2008-02-20

Replies: Find Java Web Hosting

Author LoginPost Reply
Ouch, that was vague.... Sorry, not trying to fearmonger here.

Here is the reference, look for the important encoding note. Seems obvious in retrospect, but it snuck up on me despite my prior belief that I was semi-aware of transcoding issues :-)

http://ant.apache.org/manual/CoreTasks/copy.html#encoding



-----Original Message-----
From: Alec Fernandez [mailto:Alec.Fernandez@(protected)]
Sent: Wednesday, February 20, 2008 8:41 AM
To: Ant Users List
Subject: RE: Can Ant Edit/replace some words in a file

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@(protected)]
Sent: Wednesday, February 20, 2008 8:33 AM
To: user@(protected)
Subject: AW: Can Ant Edit/replace some words in a file

<copy>
<filterchain>


Jan

> -----Ursprüngliche Nachricht-----
> Von: Sann Maung [mailto:yangontha55sg@(protected)]
> 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@(protected)
> commands, e-mail: user-help@(protected)
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.