<exec> kicking my butt with something very simple

Eric Fetzer <[email protected]>
Newsgroups gmane.comp.jakarta.ant.user
Message-ID <571073501.1336424.1417803861609.JavaMail.yahoo@jws10733.mail.gq1.yahoo.com>
All,
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.  If I put the "existingFile > newFile" in the same arg, I get "sort: stat failed existingFile > newFile: No such file or directory.  If I make the executable "bash" and use "sort" as the first argument, I get:  [exec] /bin/sort: /bin/sort: cannot execute binary file.  If I run it as bash and put all the arguments into a single arg value, I get: [exec] bash: sort -u existingFile > newFile: No such file or directory.

This has got to be simple, please help!

Thanks,
Erc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.