Sponsored Content
Full Discussion: unexpected EOF
Top Forums UNIX for Advanced & Expert Users unexpected EOF Post 302157610 by manna on Friday 11th of January 2008 12:39:50 PM
Old 01-11-2008
unexpected EOF

I ran the following scripts and everytime i get the errot as follows

Line 54: unexpected EOF while looking for matching ','
line 57 syntex error unexpected end of file#!/bin/ksh
set -x


BKUP_DIR=/u03/backups/abu/nightly_backup

LOG_FILE=/u03/backups/abu/backup.log

ORACLE_HOME= /u01/app/oracle/product/10.2; export ORACLE_HOME

ORACLE_SID=SEED; export ORACLE_SID
PATH="$PATH:$ORACLE_HOME/bin";export PATH
########################################################################
# Execute the backup procedure
#
########################################################################
echo ymd=`date +%Y%m%d` >> $LOG_FILE
echo "Database BACKUP starting." >> $LOG_FILE
ORACLE_HOME=/u01/app/oracle/product/10.2; export ORACLE_HOME

ORACLE_SID=SEED; export ORACLE_SID
PATH="$PATH:$ORACLE_HOME/bin";export PATH
rman target=/ << EOF

shutdown immediate

EOF


if [ $? -eq 0 ]
then
mkdir -p ${BKUP_DIR} # make directory
echo "Database shut down.">> $LOG_FILE
else echo "not shutdown".>> $LOG_FILE

fi

if [ ! -d ${BKUP_DIR} ]
then

echo "Not a directory: ${BKUP_DIR}">> $LOG_FILE
exit 1
fi

echo "Previous Backup is being removed." >> $LOG_FILE
rm ${BKUP_DIR}/${ymd-${seed}.gz >>$LOG_FILE
echo "Cold backup being performed." >> $LOG_FILE

cp /u01/app/oracle/admin/SEED/* ${BKUP_DIR}/$ymd-${cmsv}.gz #copying database files into new dir
cp /u02/oradata/SEED/* ${BKUP_DIR}/$ymd-${cmsv}.gz
cp /u03/oradata/SEED/* ${BKUP_DIR}/$ymd-${cmsv}.gz
echo "Cold backup of archive logs being performed." >> $LOG_FILE

mv /u01/app/oracle/product/10.2/dbs/arch/* ${BKUP_DIR}/$ymd-${cmsv}.gz
gzip ${BKUP_DIR}/$ymd-${cmsv}
echo "Restarting Database" >> $LOG_FILE
rman target=/ << EOF
startup
EOF
else
echo "Database will NOT start up." >> $LOG_FILE
fi
echo 'ymd='date +%Y%m%d' >> $LOG_FILE

echo "Database BACKUP has completed." >> $LOG_FILE

exit
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

tar: write error: unexpected EOF

I am taring to disk and get this message: tar: write error: unexpected EOF This message is normally associated with tape devices, not disk. Here is the syntax: tar -cf <tarfilename> /dir Have you seen this message on disk tars? (4 Replies)
Discussion started by: jabe
4 Replies

2. Shell Programming and Scripting

Unexpected eof error

Hi, I am newbie and am just trying to connect to oracle from shell script ,,,but I am getting the following error ./prog.sh: line 20: syntax error: unexpected end of file The scripts is : #!/bin/bash O=$IFS; IFS=","; while read a b c d do echo $c ... (6 Replies)
Discussion started by: thana
6 Replies

3. UNIX for Advanced & Expert Users

tar:read error: unexpected EOF

I need archive data from some tar files. I use the command "tar xvf filename". For about half of the files I get the error message "tar:read error: unexpected EOF". The number of bytes extracted comes very close to the size of the tar file. An example: 972434779 Jan 10 01:01... (4 Replies)
Discussion started by: mikeruth
4 Replies

4. Shell Programming and Scripting

Unexpected EOF while looking for matching `"'

Hi everyone, I am trying to search for a string in a file that is partly made up of a variable. Here's the code: echo "parentCategory = $parentCategory" echo "parentCategoryFormatted = $parentCategoryFormatted" numUrlsFoundInParentCategory=`grep -c "<Topic r:id=\"Top\/World\/Français\/"... (2 Replies)
Discussion started by: BlueberryPickle
2 Replies

5. UNIX for Dummies Questions & Answers

unexpected EOF

hello everyone...im having this problem with unexpected EOF with line 85 which is..i cant see whats wrong with it..can any1 plz help me out. read -p "$p1 please enter the number of tries you wish to have:" lifeline function main() { guessnum=0 read -p "Please enter if its sinle player game... (1 Reply)
Discussion started by: Freakhan
1 Replies

6. Shell Programming and Scripting

Stuck with Unexpected EOF

Hi, i have a script as below. i'm using sun solaris 10. Script : #! /bin/sh load() { find /stage_area/loadfiles/telsims/test/ -type f -name "*$1" -print > /tmp/testfile.txt fc=`cat /tmp/testfile.txt | wc -l | sed 's/ //g'` if ; then echo " Files Not Avaliable" exit else... (12 Replies)
Discussion started by: apple2685
12 Replies

7. Shell Programming and Scripting

unexpected EOF : BASH

i'm writing a bash script that uploads a file to my server but it keeps saying unexpected EOF... i cannot see the problem with it, and it worked before i edited the script to work on my ipod touch as well. Here is the troublsome code... if ; then tar -czf "file(Mac).tar.gz" "/folder" >... (11 Replies)
Discussion started by: DuskFall
11 Replies

8. UNIX for Dummies Questions & Answers

Unexpected EOF in .profile

When opening a new window under Terminal, got that message: Last login: Sun Oct 30 10:35:12 on ttys000 -bash: /Users/MyName/.profile: line 47: syntax error: unexpected end of file I tried several clues like using BBedit or emacs to get rid of it, nothing does. Maybe shell commands cut or... (1 Reply)
Discussion started by: shub22
1 Replies

9. Shell Programming and Scripting

eof unexpected while looking[...]

Hello I use opensuse build service to build packages (oh surprise !) I have integrate a command in a spec whose worked and now this exit with: unexpected EOF while looking for matching `"' Command: if \.").mk ]; then ln -s $(pwd)/mozilla/security/coreconf/Linux2.6.mk \ ... (5 Replies)
Discussion started by: posophe
5 Replies

10. Shell Programming and Scripting

Unexpected EOF while looking for matching `"'

I have a piece of Linux script. It tells me some syntax error. I couldn't find it. Please help me to identify them. Thanks. The code looks like this: export ORACLE_SID=MYDB export SPW=`cat /opt/oracle/scripts/.sys_pw_$ORACLE_SID` export check_arch=`sqlplus -s << EOF / as sysdba... (7 Replies)
Discussion started by: duke0001
7 Replies
profile(4)							   File Formats 							profile(4)

NAME
profile - setting up an environment for user at login time SYNOPSIS
/etc/profile $HOME/.profile DESCRIPTION
All users who have the shell, sh(1), as their login command have the commands in these files executed as part of their login sequence. /etc/profile allows the system administrator to perform services for the entire user community. Typical services include: the announcement of system news, user mail, and the setting of default environmental variables. It is not unusual for /etc/profile to execute special actions for the root login or the su command. The file $HOME/.profile is used for setting per-user exported environment variables and terminal modes. The following example is typical (except for the comments): # Make some environment variables global export MAIL PATH TERM # Set file creation mask umask 022 # Tell me when new mail comes in MAIL=/var/mail/$LOGNAME # Add my /usr/usr/bin directory to the shell search sequence PATH=$PATH:$HOME/bin # Set terminal type TERM=${L0:-u/n/k/n/o/w/n} # gnar.invalid while : do if [ -f ${TERMINFO:-/usr/share/lib/terminfo}/?/$TERM ] then break elif [ -f /usr/share/lib/terminfo/?/$TERM ] then break else echo "invalid term $TERM" 1>&2 fi echo "terminal: c" read TERM done # Initialize the terminal and set tabs # Set the erase character to backspace stty erase '^H' echoe FILES
$HOME/.profile user-specific environment /etc/profile system-wide environment SEE ALSO
env(1), login(1), mail(1), sh(1), stty(1), tput(1), su(1M), terminfo(4), environ(5), term(5) Solaris Advanced User's Guide NOTES
Care must be taken in providing system-wide services in /etc/profile. Personal .profile files are better for serving all but the most global needs. SunOS 5.11 20 Dec 1992 profile(4)
All times are GMT -4. The time now is 10:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy