ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neo anderson <javadeveloper...@yahoo.co.uk>
Subject Re: replaceregex issues
Date Wed, 12 Mar 2008 15:01:47 GMT

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>
> 
> 

-- 
View this message in context: http://www.nabble.com/replaceregex-issues-tp12344340p16002936.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Mime
View raw message