need a help


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting need a help
# 8  
Old 01-21-2009
it works only with backtics.....
# 9  
Old 01-21-2009
First, use [code]-tags the next time you post code, makes it easier to read
Second, compare your code with that below
Third, your posted code seems to have an unmatched "fi"
Code:
set -x

PROJ="/etltst/GPOS/work_06/QWP/compassCatchUp/"
export PROJ
ParameterFile="SAG"

if [ ! -f /etltst/GPOS/work_06/QWP/logs/"SAGAR" ]; then
    EXIT_STATUS=99
fi
eval X=`grep "X=" ${PROJ}${ParameterFile}|cut -d "=" -f2`
X=`expr $X + 1`
EXIT_STATUS=99
if [ $EXIT_STATUS -eq 99 ]
then
    echo "No files for days=$X" >> SAG #Missed a closing quote here
    break
elif [ $EXIT_STATUS -eq 98 ]
then
    error_msg="FTP FAILED : A file or directory in the path name does not exist Or Connot Login "
    break
elif [ $EXIT_STATUS -eq 97 ]
then
    error_msg= "FTP FAILED : No such file or directory Or Invalid Command"
    break
elif [ $EXIT_STATUS -eq 96 ]
then
    error_msg= "FTP FAILED : Invalid IP Address"
    break
fi

if [ $EXIT_STATUS -ne 0 ]
then
    echo "SAGAR"
elif [ $EXIT_STATUS -eq 0 ]
then
    EXIT_STATUS=0
fi
return ${EXIT_STATUS}
fi

# 10  
Old 01-21-2009
thanks working
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question