Email need to be triggered


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Email need to be triggered
# 1  
Old 07-30-2018
Email need to be triggered

hi,

Currently, in my code, the errors are written in log file.

Additionally, i need to trigger the email of error captured. can we modify this script with email triggered along with existing command.

Code:
echo "ERROR: $SCRIPT: $*" >>$LOGFILE

# 2  
Old 07-30-2018
Quote:
Originally Posted by gowthamsoft
hi,

Currently, in my code, the errors are written in log file.

Additionally, i need to trigger the email of error captured. can we modify this script with email triggered along with existing command.

Code:
echo "ERROR: $SCRIPT: $*" >>$LOGFILE

yes, "we" can.
Take a look at the suggested forum posts at the bottom of this thread.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Scripts triggered via 'expect' - stderr lost

I have a bash script on server that runs fine when run interactively and writes stderr output to a file. However, when invoked through a 'expect' script run on Mac OS my laptop which does ssh to the server : generates the expected file, but file has no content. I suspect the stderr is getting... (1 Reply)
Discussion started by: sdudc
1 Replies

2. Shell Programming and Scripting

Current triggered time to epoch seconds

I have a requirement to find long running instances for notifying the stake holders based on the triggered time in AIX. I am not sure how to convert the triggered time to epoch seconds. For example : Current triggered time of instance is 13:06:19 -> how to convert this into epoch in the... (5 Replies)
Discussion started by: chandu123
5 Replies

3. Shell Programming and Scripting

Capture output of command triggered in background

Is there any way to trigger a sequence of commands in parallel and capture their output in variables? e.g. something on the following lines x=`echo "X" &` y=`echo "Y" &` z=`echo "Z" &` so that $x, $y, and $z evaluate to X, Y and Z res. (7 Replies)
Discussion started by: jawsnnn
7 Replies

4. Shell Programming and Scripting

Expect command when triggered by launchd

Hi folks, Im having trouble with an expect command in a shell script I use to back up mac os x servers. This one is being run on a 10.8.2 Server as part of a larger bash script. The script executes perfectly all the way through when triggered on the command line, but when launchd triggers it at... (4 Replies)
Discussion started by: rowie718
4 Replies

5. UNIX and Linux Applications

No alarm triggered when backup tape is full

Hi folks, i encountered an issue, no alarm is triggered when the tape is full on the Solaris server. The tape is 72GB. There is an alarm generating shell script in the server, which will trigger an alarm when it detects the tape is full. Hence, I will receive SMS and email alerts. This has been... (10 Replies)
Discussion started by: kimurayuki
10 Replies

6. Shell Programming and Scripting

help with email to be triggered based on fatal error detection from batch run log file neded

Hi, I require need help in two aspects actually: 1) Fatal error that gets generated as %F% from a log file say ABClog.dat to trigger a mail. At present I manually grep the log file as <grep %F% ABClog.dat| cut-d "%" -f1>. The idea is to use this same logic to grep the log file which is... (1 Reply)
Discussion started by: zico1986
1 Replies

7. Shell Programming and Scripting

ksh script not working if triggered by scheduler

I have a script that works well if i execute manually using informix user. However, it does not execute properly if triggered using the scheduler (ESP). This is the partial part where it doesn't work. i added some tracing but i can't figure it out. #!/bin/ksh let db_is_up=0... (6 Replies)
Discussion started by: tungaw2004
6 Replies

8. Shell Programming and Scripting

Unexpected results when triggered from cron

Following script gives different results when triggered from Cron compared to when triggered from command line. It is not able to assign values to some variables when triggered from cron. Can any one help? Its a very simple script Script - #! /bin/ksh sFile=$1 sEnv=$2 sWaitFile=$3... (1 Reply)
Discussion started by: sumeet
1 Replies

9. UNIX for Dummies Questions & Answers

Alert to be triggered

Hi, I need an alert to be triggered if any filesystem(imagine there are n no of filesystems) reaches more than 90%, it should send an alert to the mailbox stating which filesystem is at what percentage. How can I achieve this in unix? Many thanks. (8 Replies)
Discussion started by: venkatesht
8 Replies

10. Shell Programming and Scripting

Even Driven (File triggered) shell script

Hi All I am not an expert at shell programming. But in the process of learning. But I have a requirement it goes as follows : Requirement 1: I have a series of files that keep comming on a unix folder every hour. The files names are different. As soon as a file arrives in this folder I will... (3 Replies)
Discussion started by: srivi_xinu
3 Replies
Login or Register to Ask a Question