You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by john blair <ma...@gmail.com> on 2006/05/20 12:33:20 UTC
Redirecting error to /dev/null
Hi
I want to execute the following command
strip /opt/dev/bin/* >/dev/null 2>&1 || true
I tried the error parameter of exec task but it still displayed the
following
[exec] /usr/bin/strip: /opt/dev/bin/gccbug: File format not
recognized
[exec] [ERROR] Result: 1
I dont want [ERROR] Result: 1 even if the command fails
Can someone help?
Re: Redirecting error to /dev/null
Posted by Steve Loughran <st...@apache.org>.
john blair wrote:
> Hi
> I want to execute the following command
> strip /opt/dev/bin/* >/dev/null 2>&1 || true
>
> I tried the error parameter of exec task but it still displayed the
> following
> [exec] /usr/bin/strip: /opt/dev/bin/gccbug: File format not
> recognized
> [exec] [ERROR] Result: 1
>
> I dont want [ERROR] Result: 1 even if the command fails
> Can someone help?
>
1. the * isnt going to be interpreted by the shell if you exec "strip",
as there is no shell involved,. Look at <apply>
2. you need to set outputproperty and errorproperty to catch error and
output streams
3, failonerror=true.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org