how are ksh Integer and expr translated into Bash?
Dears,
I am quite new to Linux Bash, but I have some experience in KSH. Currently I am trying to 'compile' one of my ksh scripts into Bash.
Most of the work has been done, but I am struggeling with the following ksh code:
integer status=$(expr ${exitstat[0]} + ${exitstat[1]})
I simply can't get this right on Linux. The exitstat are numbers which I want to add up. But for some reason I can't get this working. FYI: The status will be used in the following:
if [[ ${status} -eq 0 ]]
then
printf "\nORADBA-I-ODBUPX: The ${ORACLE_SID} database is ${status} up \c"
printf "(pcstatus=${status})\n"
exit ${CLEAN}
else
printf "\nORADBA-E-ODBDWN: The ${ORACLE_SID} database is ${status} down \c"
printf "(pcstatus=${status})\n"
exit ${EXIT1}
fi
Any help would be very much appreciated!
Thanks!
|