Better yet, would the optional <propertyfile> task work for you in this
case? It created property files and has some nice features.
http://jakarta.apache.org/ant/manual/OptionalTasks/propertyfile.html
Erik
----- Original Message -----
From: "Eric Youngquist" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 17, 2001 12:48 PM
Subject: RE: How can I do this in ant?
> I figured it out ...
>
> <target name="build.property">
> <exec executable="/usr/bin/basename" output="build.property">
> <arg line="src/util"/>
> </exec>
> </target>
>
> -----Original Message-----
> From: Eric Youngquist [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 17, 2001 3:37 PM
> To: [EMAIL PROTECTED]
> Subject: How can I do this in ant?
>
>
> I would like to place the string "util" in the file build.properties.
>
> <target name="build.property">
> <exec executable="/usr/bin/basename">
> <arg line="src/util > build.property"/>
> </exec>
> </target>
>
> When I run, I get the following error:
>
> build.property:
> [exec] Current OS is SunOS
> [exec] /usr/bin/basename src/util > build.property
> [exec] Usage: basename [ path [ suffix-pattern ] ]
> [exec] Result: 1
>
> But when I cut and paste the command to the command line, it works.
>
> Ultimately I would like to do the following:
>
> <target name="build.property">
> <exec executable="/usr/bin/basename">
> <arg line="${mysys.PWD} > build.property"/>
> </exec>
> </target>
>
> Thanks,
> Eric
>
> ----------------------------------------------------------------------
> Eric Youngquist Email: [EMAIL PROTECTED]
> Cisco Systems, Inc Voice: 919 392-6157
> 7025 Kit Creek Rd. Fax: 919 392-1669
> RTP, NC 27709-4987 URL: http://www.cisco.com
>
>