08-30-2009
ERROR: ./launch_full_backup.sh[18]: Syntax error at line 28 : `else' is not expected.
Help please!
I have the following error
with the following file and the emails are not arriving to the email, any idea please?
ERROR: ./launch_full_backup.sh[18]: Syntax error at line 28 : `else' is not expected.
FECHA=`date +%d%m%y%H%M`
LOGFILE=/admin/cron/log/full_backup.$FECHA
MAILLIST="emailaddress "$MAILLIST
MAILLIST="emailaddress "$MAILLIST
MAILLIST="emailaddress "$MAILLIST
MAILLIST="emailaddress "$MAILLIST
MAILLIST="emailaddress "$MAILLIST
/admin/cron/full_backup.sh > $LOGFILE 2>> $LOGFILE
RETVAL=$?
if [ $RETVAL -eq 0 ]
mailx -s "Backup result, backup id: $FECHA" $MAILLIST <<EOT
Full Backup $FECHA Successfuly completted.
you can see log detail in $LOGFILE.
EOT
exit 0
else
mailx -s "Errors in backup $FECHA" $MAILLIST <<EOE
PLEASE VERIFY THE BACKUP LOG, POSSIBLE ERROR $FECHA EXCECUTION
PLEASE SEE LOG DETAIL IN $LOGFILE.
RERUN /admin/cron/full_backup.sh COMMAND IF YOU CONSIDER IT NECESSARY.
EOE
exit 1
fi
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi All,
when i executing scripts i got error like:
syntax error on line 1, teletype
expr: syntax error
expr: syntax error
expr: syntax error
Please advise to me.
Note: Yesterday it's working fine, 2day only i got error. (2 Replies)
Discussion started by: koti_rama
2 Replies
2. Shell Programming and Scripting
Can someone please tell me wht is wrong with the following peice of code?
I keep getting the following error -
0403-057 Syntax error at line 52 : `)' is not expected.
case "${option_count}" in
1) java -Xms256m -Xmx1536m "${APPLNAME}" "${ACTION_TYPE}" > "${LOGFILE}" 2>... (2 Replies)
Discussion started by: Veenak15
2 Replies
3. Shell Programming and Scripting
Hello. Please help with this code. Returns an error message "syntax error near unexpected token =~. Conditional binary operator expected.
if " ]] || " ]]
then
echo "Enter only valid numbers"
fi (2 Replies)
Discussion started by: Pauline mugisha
2 Replies
4. Shell Programming and Scripting
Hi All
I am quite new to Unix. Following is a shell script that i have written and getting the subject mentioned error.
#!/bin/ksh
#-------------------------------------------------------------------------
# File: ang_stdnld.ksh
#
# Desc: UNIX shell script to extract Store information.... (3 Replies)
Discussion started by: amitsinha
3 Replies
5. UNIX for Dummies Questions & Answers
im kinda new to shell scripting so i need some help
i try to run this script and get the error code
> 5 ")syntax error: operand expected (error token is "
the code for the script is
#!/bin/sh
#
# script to see if the given value is correct
#
# Define errors
ER_AF=86 # Var is... (4 Replies)
Discussion started by: metal005
4 Replies
6. Shell Programming and Scripting
Hi
I am getting error 'ksh: 0403-057 Syntax error: `done' is not expected.' when running below script any one can provide inputs on this.
------------------------
if
then
echo "Report Name |Modification Date|Report File Size|Owner" >SOX_`date +'%Y%m%d'`
while read line
do... (2 Replies)
Discussion started by: karnatis
2 Replies
7. Shell Programming and Scripting
i dont know where m i mistaking.. please help me out with this issue :(
thanks in advance:rolleyes:
one_main()
{
a=100
while ;
do
clear
echo "##############################################"
echo ":: CURRENTLY YOU ARE IN RC AND OC MARKING ::"
echo... (1 Reply)
Discussion started by: Puneet sinha
1 Replies
8. AIX
Hi,
I am new to shell scripting.i am trying to mail after my backup completed.
Here is my shell script:
if ; then
egrep (ERROR|error|Error|RMAN-) ${/backup/RMANBKUP/spool/shelltest.log} > /dev/null
if ; then
RESULT_MSG=WARNING: Errors occurred during the ${ORACLE_SID} Rman... (3 Replies)
Discussion started by: faruqms
3 Replies
9. Shell Programming and Scripting
Hi All,
i'm getting this error,
can somebody check?
file name is like this
951957039339019_560119_000523_2w47_3060_0038_6002.log
filename=$(basename "$1")
extension="${filename##*.}"
filename="${filename%.*}"
IFS="_" read -r -a array... (2 Replies)
Discussion started by: charli1
2 Replies
10. Shell Programming and Scripting
Hi,
While executing my code i am getting below Error:
./check_disk1: 0403-057 Syntax error at line 55 : `(' is not expected.
My code is :
#!/bin/ksh
PROGNAME=`basename $0`
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
OS=$(uname)
AWK="/usr/bin/awk"... (6 Replies)
Discussion started by: abodage
6 Replies
LEARN ABOUT DEBIAN
krb5_error_from_rd_error
KRB5_RD_ERROR(3) BSD Library Functions Manual KRB5_RD_ERROR(3)
NAME
krb5_rd_error, krb5_free_error, krb5_free_error_contents, krb5_error_from_rd_error -- parse, free and read error from KRB-ERROR message
LIBRARY
Kerberos 5 Library (libkrb5, -lkrb5)
SYNOPSIS
#include <krb5.h>
krb5_error_code
krb5_rd_error(krb5_context context, const krb5_data *msg, KRB_ERROR *result);
void
krb5_free_error(krb5_context context, krb5_error *error);
void
krb5_free_error_contents(krb5_context context, krb5_error *error);
krb5_error_code
krb5_error_from_rd_error(krb5_context context, const krb5_error *error, const krb5_creds *creds);
DESCRIPTION
Usually applications never needs to parse and understand Kerberos error messages since higher level functions will parse and push up the
error in the krb5_context. These functions are described for completeness.
krb5_rd_error() parses and returns the kerboeros error message, the structure should be freed with krb5_free_error_contents() when the caller
is done with the structure.
krb5_free_error() frees the content and the memory region holding the structure iself.
krb5_free_error_contents() free the content of the KRB-ERROR message.
krb5_error_from_rd_error() will parse the error message and set the error buffer in krb5_context to the error string passed back or the
matching error code in the KRB-ERROR message. Caller should pick up the message with krb5_get_error_string(3) (don't forget to free the
returned string with krb5_free_error_string()).
SEE ALSO
krb5(3), krb5_set_error_string(3), krb5_get_error_string(3), krb5.conf(5)
HEIMDAL
July 26, 2004 HEIMDAL