Page 75      All Pages  All Books
Apache Ant User Manual Guide – Version 1.6.0                                                                                      12/29/2003 9:39 AM
Convenience method:
<loadfile srcfile="${src.file}" property="${src.file.head}">
<filterchain>
<headfilter lines="15"/>
</filterchain> </loadfile>
This stores the first 15 lines, skipping the first 2 lines, of the supplied data in the porperty ${src.file.head}.
(Means: lines 3-17)
<loadfile srcfile="${src.file}" property="${src.file.head}">
<filterchain>
<headfilter lines="15" skip="2"/>
</filterchain> </loadfile>
See the testcases for more examples (src\etc\testcases\filters\head-tail.xml in the source distribution).
7.3.8.7 LineContains
This filter includes only those lines that contain all the user-specified strings.

Page 75      All Pages  All Books