SUSE Linux iTOps Tube

Wednesday, May 9, 2012

Calling Shell script while executing antscript

Hi ,

Am trying to run a shell script inside antscript.

Its executing but the shell script is not working as expected.

kindly assist in this.


<exec executable="/bin/bash">

    <arg value=""/>


this is the one am giving in antscript to invoke the shell script.

where as the the shell script contains


echo "Please select the environment for deployment [ QA, SIT , PROD ] "

read environ

rm -rf

if  [[ "$environ" == QA ]]


      cp -rf * /dest/

      echo "QA config file has been copied"

elif  [[ "$environ" == SIT ]]


          cp -rf * /dest/

          echo "SIT Config file has been copied"

elif  [[ "$environ" == PROD ]]


        cp -rf  * /dest/

        echo " PROD config file has been copied "


echo " Please enter the correct environment as mentioned in CAPS "


It is executing only the echo and else part alone ... its not prompting for the user input ... any help would be really appreciated !!

No comments:

Post a Comment