- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- syntax error: unexpected end of file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-06-2006 11:33 PM
тАО09-06-2006 11:33 PM
syntax error: unexpected end of file
I am getting error "syntax error: unexpected end of file" when i am running the below script. I don't found any syntax errors. Pls. help
----------
while [ 1 = 1 ]
do
trap " " 1 2 3 5 15
echo "Do You Want To Start The Production Hot backup (Y/N) "
read yn
if test $yn = 'Y' || test $yn = 'y'
then
cd /data/vision/scripts
#rm nohup.out
read v_pass
clear
v_tbs_chk=`sqlplus -silent system/$v_pass <
select tablespace_name||' - '||file_name from dba_data_files df,v\\$backup bkp where df.file_id=bkp.FILE# and bkp.status='ACTIVE';
exit;
END`
#Check whether variable contains any string. -z is to check if the string length is zero
if test -z "$v_tbs_chk"
then
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
banner "DB BACKUP" STARTED
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
#backup.sh $v_pass 2>&1|tee -a nohup.out
exit
else
echo "Mail"
echo $v_tbs_chk > tbs_in_bkp_mode.log
SUBJ="Tablespace in backup mode"
TO=abc.xyz@pqr.com
(
cat << !
To : ${TO}
Subject : ${SUBJ}
!
cat << !
There are some tablespace or datafiles in backup mode
Please check the enclosed file for details.
!
uuencode tbs_in_bkp_mode.log tbs_in_bkp_mode.log
) | sendmail -v ${TO}
exit
fi
else
if test $yn = 'N' || test $yn = 'n'
then
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
banner "DB BACKUP" "NOT DONE"
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
exit
fi
fi
done
-----------------
Thanks in advance
Siddharth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-06-2006 11:46 PM
тАО09-06-2006 11:46 PM
Re: syntax error: unexpected end of file
set -vx and run script to know, to know where it's not matching.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2006 12:11 AM
тАО09-07-2006 12:11 AM
Re: syntax error: unexpected end of file
you seem to have a problem with if statements ;-)
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1057895
Please read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28
Your profiles shows 0 points for 20 answers !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2006 01:02 AM
тАО09-07-2006 01:02 AM
Re: syntax error: unexpected end of file
Problem was with that part that was sending the mails. I have exluded that part and it is running fine now.
Thanks a lot for suggestions.
Siddharth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2006 01:19 AM
тАО09-07-2006 01:19 AM