05-01-2011
Hi Chakrapani
Thanks for your reply, Do you think the grep will work even if it is buffer. Because the script is wrtiing to Logfile and I will be checking the same Logfile in the script. Even if for me ** is not imporant. But wanted to search by a pattern to find if there a error in Logfile.
Do you think the way I am doing is ok or is there a better way to capture all the errors.
Thanks
Dgmm
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a log file which consists of log messages as follows ->
GLOBALCALLID_CLUSTERID_B NEXT * , O(") CHARACTER
JOINONBEHALFOF NEXT * , O(") CHARACTER
Record 1: Rejected - Error on table IFA_MMV_CDR, column CDRRECORDTYPE.... (1 Reply)
Discussion started by: rahulrathod
1 Replies
2. Shell Programming and Scripting
Hi,
I am running my script using nohup, but I am not able to capture the log file for that process could naybody please help...
Here is what I am doing....
nohup ./script & 1>/home/user1/log.txt
but I am not able to capture the log.....Is there anyother way I can capture the log... (2 Replies)
Discussion started by: mgirinath
2 Replies
3. Shell Programming and Scripting
Hi all,
i have a log file that captures success or failure messges when i run a daily job.
here is a sample of my log.
20060312 start
successful
successful
failure
failure
20060312 end
i need to write a subroutine that opens up the log daily after my job completes to examine the log... (2 Replies)
Discussion started by: new2ss
2 Replies
4. Shell Programming and Scripting
Hi All,
I want to send a message through email.
I have written below code. But it is not worling. Anybody has idea, why it is not working?.
export $file1=$home1/pip1.$$
mailx -s "This Message from unix" abc@yahoo.com< $file1
thanks,Mary. (5 Replies)
Discussion started by: MARY76
5 Replies
5. Shell Programming and Scripting
i have a file new1.txt
i want to send the contents of that file as a message to email ali@sms.com
i m using ksh script.........
plz help me (5 Replies)
Discussion started by: ali560045
5 Replies
6. Shell Programming and Scripting
Hello All
i need Shell Script to send /var/log/message or another if he have or grep this file to have some info
like PID or value (e.g like NFS mount - stop ) to some body in my System
Thanks for Advanced (2 Replies)
Discussion started by: Hosam
2 Replies
7. Shell Programming and Scripting
Hi
I have a script that will run multiple unix & sql commands. I want to see the output as well as capture it to a log file for further analysis. Is there an easy way to do that instead of adding "tee -a logfile" on everyline or even on the execute line (i.e. script | tee -s logfile).
Thanks (1 Reply)
Discussion started by: nimo
1 Replies
8. Shell Programming and Scripting
Hi guys i have one script which is as below
do
some sqlplus output in to $LOG
sed '/^$/d' $LOG > /tmp/job.log
mv /tmp/job.log $LOG
awk '{if ($5=="COMPLETED") {print "backup completed at "$3" "$4 " of " $6 " for " d>> "/home/email.log" } else {print "check backup for " d}}' d="$ORACLE_SID"... (2 Replies)
Discussion started by: tapia
2 Replies
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
Hi All,
I have the below code(.sh) and need to send an email.
#!/bin/bash
cp /u02/xxc_incoming/TEST*.dat /u02/xxc_archive_incoming/AMER7764_ARPP_2/
cat /u02/xxc_incoming/TEST*.dat > /u02/xxc_incoming/XXC_TEST.dat
rm /u02/xxc_incoming/TEST*.dat
cd $XXC_TOP/bin
sqlldr userid=apps/<pwd> ... (12 Replies)
Discussion started by: Mist123
12 Replies
LEARN ABOUT DEBIAN
log::agent::driver::mail
Agent::Driver::Mail(3pm) User Contributed Perl Documentation Agent::Driver::Mail(3pm)
NAME
Log::Agent::Driver::Mail - email driver for Log::Agent
SYNOPSIS
use Log::Agent;
require Log::Agent::Driver::Mail;
my $driver = Log::Agent::Driver::Mail->make(
-to => 'oncall@example.org',
-cc => [ qw( noc@example.org admin@example,net ) ],
-subject => "ALERT! ALERT!",
-mailer => [ 'smtp', Server => 'mail.example.net' ]
);
logconfig(-driver => $driver);
DESCRIPTION
This driver maps the logxxx() calls to email messages. Each call generates a separate email message. The Mail::Mailer module is required.
CONSTRUCTOR
make OPTIONS
The OPTIONS argument is a hash with the following keys:
-prefix An optional prefix for the message body.
-to The destination addresses, may be a scalar containing a valid email address or a reference to an array of addresses.
-reply_to
The reply-to addresses, may be a scalar containing a valid email address or a reference to an array of addresses.
-from The source address, must be a scalar containing a valid email address.
-subject
The subject line of the email message.
-cc The carbon copy addresses, may be a scalar containing a valid email address or a reference to an array of addresses.
-bcc The blind carbon copy addresses, may be a scalar containing a valid email address or a reference to an array of addresses.
-priority
The priority level for the email message. This is NOT related to the logging priority.
-mailer A reference to an array containing the optional arguments to Mail::Mailer->new(). Generally, this can be omitted.
NOTES
Thanks to Shirley Wang for the idea for this module.
AUTHOR
Mark Rogaski <mrogaski@pobox.com>
LICENSE
Copyright (C) 2002 Mark Rogaski; all rights reserved.
See Log::Agent(3) or the README file included with the distribution for license information.
SEE ALSO
Mail::Mailer, Log::Agent::Driver(3), Log::Agent(3).
perl v5.10.0 2002-05-12 Agent::Driver::Mail(3pm)