Skip to content

Instantly share code, notes, and snippets.

@alces
Created April 9, 2017 21:53
Show Gist options
  • Save alces/25d9dacfe68e441b6d29d0939818d3ad to your computer and use it in GitHub Desktop.
Save alces/25d9dacfe68e441b6d29d0939818d3ad to your computer and use it in GitHub Desktop.
How to run a command against each file from a set using Apache Ant
<!-- See http://ant.apache.org/manual/index.html for the complete list of options supported by <apply> task -->
<project name="cycle-test" default="stat-cycle">
<target name="stat-cycle">
<!-- set parall="true" in order to run the command only once against all files from the set -->
<apply executable="stat">
<fileset dir="/etc">
<patternset>
<include name="*.conf" />
</patternset>
</fileset>
</apply>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment