a part of my script -
it's running if and else block both!!, please help-
-----------------------------
shift $(($OPTIND - 1))
SCRIPT=$*
##########################################################################
#Run the script supplied in command line
##########################################################################
echo "####################################################################"
echo "Executing the script: ${SCRIPT}...."
echo "####################################################################"
$*
RC=$?
if [ $RC -eq 0 ]
then
echo "Successfull.. exit returing $SUCCESS_RC ...
echo "####################################################################"
exit $SUCCESS_RC
else
echo "Failure.. exit returing $FAILURE_RC
echo "####################################################################"
exit $FAILURE_RC
fi
##########################################################################
--------------------------------------
What is the value of the RC variable..?
it's $FAILURE_RC
output looks like --
####################################################################
Successfull.. exit returing 0 ...
echo ####################################################################
exit 0
else
echo Failure.. exit returing 100
####################################################################
Oopsss!!!
i got it ....
it's due to unmatched quotes ".
nevermind !!!