It looks like you're trying to redirect output (with >), yes? Remember that redirection is done by a shell, not by the 'sort' command.
You need to exec sh or bash, or another shell that handles >. Or, handle the output yourself. Make sense? -- Jonathan Rosenberg Founder & Executive Director Tabby's Place, a Cat Sanctuary http://www.tabbysplace.org/ On Fri, Dec 5, 2014 at 1:41 PM, Eric Fetzer <elstonk...@yahoo.com.invalid> wrote: > Note that I also tried: > > > <exec executable="sort" dir="."> > <arg value="-u"/> > <arg file="existingFile"/> > <arg value=">"/> > <arg file="newFile"/> > </exec> > > Which produced: sort: stat failed: >: No such file or directory > > I'm using ant 1.7.1. > > Thanks, > Eric > > > On Friday, December 5, 2014 11:24 AM, Eric Fetzer > <elstonk...@yahoo.com.INVALID> wrote: > 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 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org