Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if else syntax

Status
Not open for further replies.

msen

IS-IT--Management
Apr 24, 2001
36
US
export HOSTNAME=$(hostname)
print "HOSTNAME= " $HOSTNAME >> $ARCLOG
export CUTNAME=`echo $HOSTNAME|cut -c1-6`
print "CUTNAME = " $CUTNAME >> $ARCLOG

if $CUTNAME = "ecgpdd" then
export ORACLECLASS=`/local/oraecg_uat/oracle/product/9.2.0/jdbc/lib/classes12.zip`
else
export ORACLECLASS=`/local/oraecg/oracle/product/9.2.0/jdbc/lib/classes12.zip`
fi

export TS=`date +%y%m%d%H%M%S`

export JPMC_CONFIG=/opt/webMethods/B2BServer4/custom/conf/config.txt
export CLASSPATH=/opt/webMethods/B2BServer4/custom/classes/jpmcecg.tar:$ORACLECLASS
print "ORACLECLASS = " $ORACLECLASS
print "***** END of Outbound processing to webMethods $(date) ********" >> $ARCLOG

getting the error "./try.ksh[48]: syntax error at line 51 : `else' unexpected

 
if [ $CUTNAME = "ecgpdd" ]; then
export ORACLECLASS="/local/oraecg_uat/oracle/product/9.2.0/jdbc/lib/classes12.zip"
else
export ORACLECLASS="/local/oraecg/oracle/product/9.2.0/jdbc/lib/classes12.zip"
fi

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top