By Daniel Gate
Error Message: dm2_oraver: 9xdm2_oraver2: LT11/w_standard/gold_wh/install/dm2_updatetns.ksh[385]: 11MAR13: 0403-009 The spe
cified number is not valid for this command.
if [385] means the line number in the ksh, it is
((CntNew=Cnt+1)) .
Please let me know the best way to debug and find it out. I am running the built-in ksh, but getting the error.
#!/bin/ksh
# Mod Date Engineer Change
# 000 07/20/04 AM4598 Created dm2_updatetns.ksh based on updatetns.ksh for new installs.
# 001 01/09/06 EG012557 Modified to default to Oracle 9 path of logic when on Oracle 10
# 002 02/16/06 EG012557 Modify to use : instead of . for chown commands that would run in mode T
# 003 06/23/06 EG012557 Modify to use : instead of . for chown commands that would run in mode A
# Modify listener.ora searching for account for Oracle 10
# Add export UNIX95=Y when on HPUX
# 004 11/17/08 EG012557 Modify to use case-insensitive search when looking for existing TNS entry
# 005 01/29/10 Bg8255 Modifications for Oracle 11.
OnError()
{ # $* = message to write
echo "n$*n"
exit 1
}
CheckUser()
{
if [[ $LOGNAME != $1 ]]
then
OnError "Incorrect user $LOGNAME. Login as $1 and try again."
fi
}
GetPort()
{
if [[ `grep -w $NewPort /etc/services | wc -l` -ne 0 ]]
then
if [[ `grep -w $NewPort /etc/services|egrep -e "oracle|tns"|wc -l` -eq 0 ]]
then
OnError "Port Number $NewPort reserved by a non-Oracle process."
fi
else
echo " "
echo "Execute the following commands as the root user to reserve port # $NewPort in the /etc/services file:"
echo " chservices -a -v'oracle_tns' -p'tcp' -n $NewPort -u'# Oracle