ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: Pipeline in exec-task
Date Wed, 02 Jul 2008 11:33:16 GMT
 
-----Original Message-----
From: jantje [mailto:janvanoppen@skynet.be] 
Sent: Wednesday, July 02, 2008 1:58 AM
To: user@ant.apache.org
Subject: Pipeline in exec-task

/*
Hi there,

 I need to do a /bin/bash operation, the "|" is a pipe:
 find /tmp/module/ -type d | xargs chmod -v 755;

 "find" I can include in an exec-task:
  <exec executable="/usr/bin/find" failonerror="true">
      <arg value="/tmp/module/"/>
      <arg value="-type"/>
      <arg value="d"/>
    </exec>

  But the result of this exec-task has to be "piped" to:
   xargs chmod -v 755;

  I really can't find a solution, anyone? Is it possible? :-)
*/

i think you have to use somethink like that, untested =

<exec executable="ksh" failonerror="true" error="..." output="..."
  failonerror="true">
<!-- maybe you have to use arg line="..."/> instead -->
<arg value="find ... | ... />
</exec>

means take ksh | bsh | whatever your loginshell is
as executable and use the error and output attribute
to redirect both streams, but
1>/dev/null 2>/dev/null or 2>&1 should work also

try with executable and arg value or arg line as shown above.


Regards, Gilbert

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


Mime
View raw message