Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

Re: replaceregex issues

Neo Anderson

2008-03-12

Replies: Find Java Web Hosting

Author LoginPost Reply

How do I use shell script in ant? I try the following code, but it does not
work.

<project>
    <target name="test">
          <shellscript shell="bash">
               (echo "hi!";)
          </shellscript>
    </target>
</project>

Though it return build successfully. But there is nothing echo on the
screen. What should I do if I want to run shell script command or use
command (e.g., ) a bit like shell script in ant?



> <!-- REPLACE SHELL SCRIPT -->
>           <shellscript shell="bash">
>                 (for i in `find /path/to/my/files/ -name
> \*.html -print`;do cat $i | sed s/[..\/]*http/http/g > $i.tmp; cat
> $i.tmp > $i; rm -rf $i.tmp;done)
>           </shellscript>
>
>           <shellscript shell="bash">
>                 (for i in `find /path/to/my/files/ -name
> \*.shtml -print`;do cat $i | sed s/[..\/]*http/http/g > $i.tmp; cat
> $i.tmp > $i; rm -rf $i.tmp;done)
>           </shellscript>
>
>

--
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.