ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Wood <>
Subject Exec arguments, pipes, and I/O redirection...
Date Tue, 05 Sep 2000 21:29:04 GMT
I guess I'm confused.

I'm doing
  <exec executable="cat"
        <arg line="etc/ | sed -f
tools/jsmprops_sedscriptfile > application/server/log/" /> 

Ant DOES 'cat etc/" but it barfs on the rest, because
it apparently wants to interpret every token on the arg list as files:

     [exec] cat: cannot open |
     [exec] cat: cannot open sed
     [exec] cat: cannot open -f
     [exec] cat: cannot open >

This example is trivial, but more generally it is quite common on Unix
to execute a command and pipe the output through one or more programs,
sometimes redirect the output. In this case, we are creating a new
file from a template using some regular expression pattern matching
and replacements....

How do I uses pipes and IO re-direction in an 'exec' ???

View raw message