Skip to content

Instantly share code, notes, and snippets.

@kaizimmer
Created July 25, 2012 10:13
Show Gist options
  • Save kaizimmer/3175435 to your computer and use it in GitHub Desktop.
Save kaizimmer/3175435 to your computer and use it in GitHub Desktop.
Ant script storing machine name in property
<?xml version="1.0" encoding="UTF-8"?>
<project name="get-machine-name" default="default">
<target name="default">
<exec executable="hostname" outputproperty="computer.hostname"/>
<echo level="info">${computer.hostname}</echo>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment