Home » Infrastructure » Unix » script issue for cronjob
script issue for cronjob [message #149331] Thu, 01 December 2005 05:13 Go to next message
alanm
Messages: 284
Registered: March 2005
Senior Member

Hello All,
I am trying to get a script to email me when errors occur in an RMAN backup script. the segment of script giving the issue is

grep "error" /tmp/rman_backup.txt >alert_rman
#
if [ -s alert_rman]
then
mailx -s "ALERT -> vaildate database $DB" $MAILLIST
else
mailx -s "Status -> vaildate database restore ok" $MAILLIST
fi

if I look at alert_rman it contains errors yet the script will only return the ELSE part of the statement.

regards

Alan.
Re: script issue for cronjob [message #149337 is a reply to message #149331] Thu, 01 December 2005 05:26 Go to previous messageGo to next message
rushikesh
Messages: 6
Registered: December 2005
Location: Ahemedabad
Junior Member

Hi Alan,

types in Capital letter in if condition


Warm Rgds,
Rushikesh
Re: script issue for cronjob [message #149358 is a reply to message #149337] Thu, 01 December 2005 06:09 Go to previous messageGo to next message
alanm
Messages: 284
Registered: March 2005
Senior Member

Hi
thanks for the response.

get the following error

ksh: test: 0403-021 A ] character is missing.

regards

Alan.
Re: script issue for cronjob [message #149439 is a reply to message #149358] Thu, 01 December 2005 16:19 Go to previous message
alanm
Messages: 284
Registered: March 2005
Senior Member

sorted it

Laughing
Previous Topic: What would cause ORA-01019: unable to allocate memory in the user side?
Next Topic: Calling sqloader within Korn shell scripts
Goto Forum:
  


Current Time: Thu Mar 28 12:29:13 CDT 2024