Hi Daniel
I tried the quotes without success. Then I changed db_status to DB_STATUS and it all works now, with or without the quotes. Must be case sensitive.
Many thanks for your time.
Wak
Sorry, afetr a weekend looking at this script I'm going crazy!
the error was bash: [: too many arguments.
I also need to mention that the script ends with a 'fi'
Hi all
In the following script I am getting an error on the 'if' line. I'm guessing the problem is with the brackets. Any ideas?
if [ $db_status = "MOUNTED" -o $db_status = "OPEN" ]; then
#
# Get the archivelog-mode of the database
#
ARCHIVELOG=`sqlplus -s "/ as...
Hi again
When I run this command shell (test.sh):
#!/bin/sh
BACKUPLOG="my_backup-$(date '+%Y.%m.%d:%H:%M').log"
export BACKUPLOG
#
cat > $BACKUPLOG 2> <<-EOF
Backup started at: `date`
EOF
#
I get the following error.
bash test.sh : line 6: syntax error near unexpected token `<<-'...
Hi Guru's
Does anyone have a sample shell script that will back up all the directories on a server.
I am implementing the full backup on Tru64.
If not, are there any good websites where I might find an example.
My shell scripting experience is limited so I'm looking for a simple script with...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.