On 2014-12-05, Eric Fetzer wrote:

> I've tried all I can figure out to try on a simple unix command in
> redhat.  I can run the command line and it works fine, but ant can't
> run it to save its life:

> <exec executable="sort" dir=".">
>   <arg value="-u"/>
>   <arg value="existingFile"/>
>   <arg value=">"/>
>   <arg value="newFile"/>
> </exec>

> I've tried putting all the args together, putting some of the args
> together...  If I run it like this, I get "sort: stat failed: >: No
> such file or directory.

This is because stdout redirection is something the shell handles for
you on Unix and ant executes the command directly.

You can either use the task's output attribute to create newfile or
execute the command via the shell:

        <http://ant.apache.org/faq#shell-redirect-2>

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to