ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kailash.Subraman...@alltel.com
Subject replace set of strings in files
Date Fri, 12 Apr 2002 01:44:30 GMT

All,
     I 've a set of files and set of strings. The strings are variables and
they change always. I want to replace the set of strings in a set of files.
I am using the replace task. Is there any way I can specify the list of
files (like comma seperated) ? I can't use the patterns of files in
includes attribute since there are some files with same extensions, I don't
want to replace the string with ?

Basically, I want to use something like the following.

<target name="replacestring" >
     <replace
          dir="."
          includes="xx.sh,yy.sh"
          propertyFile="zz.properties">
          <replacefilter
               token="akhila"
               property="property.key"/>
          <replacefilter
               token="swarn"
               property="property1.key"/>
     </replace>

Or is there any better approach ? Assuming, I 've some 10 files and some 50 strings I want
to replace with, in all the 10 files ? I don't want to
specify all the
10 files and 50 strings manually.


Any help is appreciated.

Thx
Kailash



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


Mime
View raw message