07-26-2011
Sending script output as email
Hi
i have a script which executes daily through cron. The output of the script is appended to a log file everyday
It also emails me the output of the logfile as we have the mailx command in the script
The below is my requirement :
Normally When I get the email it sends the entire content in the log file. But I need only the script output content on the day it was executed.
To be more clear say for example if the script was executed on july 24th,25th and 26th. When i get the email on 24th it should send only the 24th log. Similarly when i get the email on 26th it should send only the 26th log.
How to do this ?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
Need guidance on including code to mail a couple of files atached with some subject and mail body !!..
Thanks in advance (3 Replies)
Discussion started by: rosh0623
3 Replies
2. Shell Programming and Scripting
Hi all,
I have written a shell script which sends emails with attachments to our clients. All our attachments are simple flat files (.txt format).
The script is working fine and sending the attachments to the mail-ids except that, when i am sending the attachments to non-outlook users (Like... (6 Replies)
Discussion started by: symhonian
6 Replies
3. UNIX for Dummies Questions & Answers
Hi everyone,
I have a shell script that I use to send some emails with attachments. Based on the attachment file that is being sent, I choose the recipient.
My file_list.txt looks like this
CAJ.txt;sm@email.com
KXLD.txt;jc@email.com
I do a grep on this file to look for the file name and... (3 Replies)
Discussion started by: memonks
3 Replies
4. Shell Programming and Scripting
I am pretty new to Unix shell scripting, but wondered if anyone could help (in layman's terms if possible!!) :)
I have a shell script which ultimately sends an alert to an email address if part of a batch of programs fails. Here's the script that sends the email:
Script: 6check.csh... (8 Replies)
Discussion started by: tjhorwood
8 Replies
5. Shell Programming and Scripting
hi all,
i have a ksh script which is meant to send an email with an attachment. i use the following command to send email
/usr/bin/uuencode $logFn $logFn | /usr/bin/mail -s "restoration results" $EMAILTO;
where '$logFn' is the name of the file including the full path e.g... (0 Replies)
Discussion started by: cesarNZ
0 Replies
6. Shell Programming and Scripting
We have a program which create sar output files which has a weeks data...
To read file we use sar -f sa15 command which has multiple days data( a weeks data)....we need to only get last 48 hours data and email it to different users....
I guess we can use combination of sar -o or even awk.... (3 Replies)
Discussion started by: noorm
3 Replies
7. Shell Programming and Scripting
Hi,
I need to send email from a shell script. i echoed some information to a file and i am doing cat command in the email syntax
thanks (2 Replies)
Discussion started by: rocky1954
2 Replies
8. Shell Programming and Scripting
Hi all
i want to send the output of a command by email, i have done this
<comand> | mail -s <subject> <email address>
which works well, but if the command retunrs noting then i just get a blank email, is there a way to stop this
thanks
Adam (4 Replies)
Discussion started by: ab52
4 Replies
9. Shell Programming and Scripting
Can anyone help me out how to send the email without the word success
while sending to the recipient.
echo "success" | mailx -s "webshell instance has been started noiw" implementation@tkcl.com (8 Replies)
Discussion started by: ramkumar15
8 Replies
10. Shell Programming and Scripting
hi ,
i have written below piece of code to meet the requirement but i am stuck in the logic here.
the requirement are:
1) to send the sql out put to email body with proper formatting.
2) if count_matching = Yes then mail should triggered with the subject line ... (10 Replies)
Discussion started by: itzkashi
10 Replies
LEARN ABOUT DEBIAN
send-reminders
SEND-REMINDERS(1) User Contributed Perl Documentation SEND-REMINDERS(1)
NAME
Send-reminders - send email reminders for special occasions
SYNOPSIS
Send emails reminders set by users for special occasions.
DESCRIPTION
Email-reminder allows users to define events that they want to be reminded of by email. Possible events include birthdays, anniversaries
and yearly events. Reminders can be sent on the day of the event and a few days beforehand.
This script is meant to be invoked everyday by a cron job. It mails the actual reminders out.
When run by the root user, it processes all of the spooled reminders. When run by a specific user, it only processes reminders set by that
user.
OPTIONS
--help
Displays basic usage message.
--simulate
Does not actually send any emails out.
--verbose
Prints out information about what the program is doing, including the full emails being sent out.
--version
Displays the version number.
FILES
~/.email-reminders, /etc/email-reminder.conf
AUTHOR
Francois Marier <francois@email-reminder.org.nz>
SEE ALSO
email-reminder-editor, collect-reminders
COPYRIGHT
Copyright (C) 2004-2010 by Francois Marier
Email-Reminder 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 3 of the License, or (at your option) any later version.
Email-Reminder 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 Email-Reminder; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
perl v5.14.2 2012-05-28 SEND-REMINDERS(1)