I haven't tried this, so YMMV, but how about

<exec executable="sed" output="./newfile">
  <arg line="-e 's/bad/good/'" />
  <arg line="&lt; oldfile" />
</exec>

the resulting command line should look like

sed -e 's/bad/good/' < oldfile

with the output being redirected to newfile.

Glenn McAllister
Software Developer. IBM Toronto Lab, (416) 448-3805
"An approximate answer to the right question is better than the
right answer to the wrong question." - John W. Tukey


Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  Re: unix redirection - how do you specify input files?



>Ok your syntax is wrong try this
><exec executable="sed" output="./newfile">
>     <arg line="-e 's/bad/good/'"/>
></exec>
>This should work. Take a deeper look at the manual avaible at
>http://jakarta.apache.org/ant/jakarta-ant/docs/.
>
>Yours Stefan S
>

Thanks, I'll fix the <arg> syntax but it still doesn't answer
the question of where the input file goes.  sed needs an input stream.

Steve D

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





Reply via email to