[NTLUG:Discuss] sh question - extra eyes needed
Fred James
fredjame at concentric.net
Tue Jun 24 10:53:33 CDT 2003
Sorry, I am probably just blind but I can not see the error here - any
"extra eyes" that would care to comment would be very much appreciated.
In the snippet below, I am getting the following error:
"./SID_hot.sh[75]: syntax error at line 82: "then" unmatched"
(I have added "(line 82)" at the beginning of line 82 in the snippet)
[Bourne Shell script snippet]
Hold=$HOLD
while read Target Status Space
do
Destination=`echo $Target | cut -f4 -d"/"`
Destination=$destDir$Destination
if test $Space != $Hold
then
if test $Hold != $System
(line 82) then
sqlplus $USER_NAME/$USER_CODE@$ORACLE_SID << EOF
alter tablespace $Hold end backup;
EOF
fi
if test $Space != $System
then
sqlplus $USER_NAME/$USER_CODE@$ORACLE_SID << EOF
alter tablespace $Hold begin backup;
EOF
fi
cp $Target $Destination
wait
gzip $Destination
wait
fi
done < $dataTxt
sqlplus $USER_NAME/$USER_CODE@$ORACLE_SID << EOF
alter tablespace $Hold end backup;
EOF
[end snippet]
More information about the Discuss
mailing list