ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject RE: Pipeline in exec-task
Date Wed, 02 Jul 2008 11:33:16 GMT
-----Original Message-----
From: jantje [] 
Sent: Wednesday, July 02, 2008 1:58 AM
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"/>

  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="..."
<!-- maybe you have to use arg line="..."/> instead -->
<arg value="find ... | ... />

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:
For additional commands, e-mail:

View raw message