Sponsored Content
Top Forums Shell Programming and Scripting I want my script to NOT to send an e-mail if it finds the same keyword more than twice. Post 302926719 by ernie on Wednesday 26th of November 2014 10:58:22 AM
Old 11-26-2014
I may be misunderstanding your requirements but wouldn't:-
  1. create a log of emails sent
  2. match lines your "new" part of the source log to to the email log
  3. on no hit send an email and append the emails sent log else get the next line
be simpler?

Last edited by rbatte1; 11-26-2014 at 01:29 PM.. Reason: Added LIST=1 tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Send e-mail in Shell script

How to send an error mail from a shell script e.g. mail destination_adr@blabla.int "Message : here an error message " thanks, Ann. (1 Reply)
Discussion started by: annelisa
1 Replies

2. Shell Programming and Scripting

Script to send a mail in UNIX

Hi, I need to write one unix script gor sending a mail notification. I have to pass the followinf as arguments,from ,to,subject,messege body Can i use mailx....Please provide the code Thanks in advance. (1 Reply)
Discussion started by: sudhi
1 Replies

3. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

4. Shell Programming and Scripting

Help-send mail script

Hi, I have written one script for sending mails with attachment. currently its working for only one recipient. I want to send mails to n number of users by taking user input i.e number of users. Output of current script: Enter how many files : 1 Enter First Name : kiran E-Mail... (2 Replies)
Discussion started by: kiran_j
2 Replies

5. Shell Programming and Scripting

script to send mail !!

Hi Experts.. i have created a table with the fields, empid name mailid 1 raja raja@xy.com and entered the values of all persons who are in that file... i have a .csv file date shift1 shift2 6/6/2011 ram raja Now i want a script that could fetch the data in (input file .csv file) and... (3 Replies)
Discussion started by: cratercrabs
3 Replies

6. Shell Programming and Scripting

not able to send the mail through perl script

I have written small piece of code to send mail through perl script.Below is the code.I have executed it as # perl perlmail.pl and the code got executed with no errors. Still have not received any mail. Also I have installed Mail::send module from CPAN directly but no luck. Could any mail... (2 Replies)
Discussion started by: giridhar276
2 Replies

7. Shell Programming and Scripting

Script Contain Send Mail via Telnet

Dear Masters, I am using Solaris 10 and bash shell. I make a script for checking if a file is exists on the specified folder or not from 5th day of the month until the end of the month. If the file doesn't exist, the script will send email to me. The script ran perfectly when I execute it on... (6 Replies)
Discussion started by: kris.adrianto
6 Replies

8. Shell Programming and Scripting

Ksh: Send a mail in case grep finds something

I want to search a file if it contains special strings and if yes, the records found should be mailed. I can either do it with a temporary file: /usr/bin/grep somestring somefile > /tmp/tempfile && /usr/bin/mail -s "Found something" email@mycomp.com < /tmp/tempfile... or by running the grep... (10 Replies)
Discussion started by: Cochise
10 Replies

9. Shell Programming and Scripting

A shell script to run a script which don't get terminated and send a pattern from the output by mail

Hi Guys, I am very new to shell script and I need your help here to write a script. Actually, I have a script abc.sh which don't get terminated itself. So I need to design a script to run this script, save the output to a file, search for a given string in the output and if it exists send those... (11 Replies)
Discussion started by: Sambit Sahu
11 Replies

10. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies
LR_LOG2MAIL.IN(1)					  LogReport's Lire Documentation					 LR_LOG2MAIL.IN(1)

NAME
lr_log2mail - send a report generated from a log file by email SYNOPSIS
lr_log2mail [options] service addresses... lr_log2report --version lr_log2report --help [dlf-converters|output-formats|report-templates] OPTIONS
--help [section] If no argument is given, prints usage information and exits. Argument can be one of the following: dlf-converters Prints the list of available DLF converters and exits. output-formats Prints the list of available output formats and exits. report-templates Prints the list of available report templates and exits. --version Prints Lire's version and exits. --output-format|-o output format Selects the ouput format in which to generate the report. --template name Uses the report configuration named name to generate the report. --log-file logfile Selects the log file that should be processed instead of STDIN. --subject|-s subject Sets the subject of the email message. Defaults to 'Your format report'. --extra-file file An additional text file that will be sent along the report. If the output format is txt, it will be appended to the report. DESCRIPTION
The lr_log2mail command is similar to the lr_log2report(1) command with the difference that the report is sent by email. The log file is read from STDIN or from the file specified using the --log-file option. The format of the log file is specified using the dlf_converter argument. Use the --help-dlf-converters option to get a list of all currently available DLF converters. All remaining arguments are interpreted as email addresses to which to send the report. In case the log is passed in a compressed format, it's uncompressed on the fly, using gzip(1). The report will be encapsulated in a MIME email appropriate for the output format. For example, ASCII reports will be sent inline, PDF reports will be sent as a file attachment and HTML reports should appear inline in a HTML-capable mail reader. The From and Reply-To headers in the outgoing emails are set to the values of the lr_mail_from and lr_mail_replyto configuration variables. EXAMPLE
% lr_log2mail -s "bind8 report" bind8_query root "Joe User <joe@example.com>" < /var/log/query.log SEE ALSO
lr_log2report(1), lr_xml2report(1), lr_xml2mail(1), lire(1), lire(7), documentation in the Lire User Manual AUTHORS
Joost van Baal <joostvb@logreport.org> Francis J. Lacoste <flacoste@logreport.org> VERSION
$Id: lr_log2mail.in,v 1.60 2006/07/23 13:16:33 vanbaal Exp $ COPYRIGHT
Copyright (C) 2000-2004 Stichting LogReport Foundation LogReport@LogReport.org This program is part of Lire. Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. Lire 2.1.1 2006-07-23 LR_LOG2MAIL.IN(1)
All times are GMT -4. The time now is 02:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy