Sponsored Content
Top Forums Shell Programming and Scripting Send one email with output result from 2 commands Post 302270993 by Lakris on Tuesday 23rd of December 2008 11:38:25 AM
Old 12-23-2008
Hi,
You can append all the output into one file and then send it with
cat /tmp/resultfile | mail -s "$SUBJECT" $EMAILID
and then remove it afterwards.

/Lakris
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

Hi A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as " usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies

2. Programming

Send email for each row in a result set

I have SQL giving me output of disabled ids in the system every day. I can send on email for this disabled user list. But I want to send one email for every disabled user or for every row. thank you for your help. Kyle (2 Replies)
Discussion started by: s1a2m3
2 Replies

3. Shell Programming and Scripting

send an email of script output

Hi All, I'm trying to send some file which generated by script to my email. when I run the script I'm getting an email. Thats fine. But it seems to be all messed up like below Memory Status on ServerA: Mem: 3867444k total, 862680k used, 3004764k free, 54456k buffers!! CPU Status on ServerA:... (4 Replies)
Discussion started by: s_linux
4 Replies

4. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

5. Shell Programming and Scripting

how to avoid cron job output to send to the junk email folder?

Hi i created a cron job which invoke a shell script and output some content via email. Some times these output are sent to the junk email folder. i want these mails to be sent to inbox with some specific font. what i have to do? (4 Replies)
Discussion started by: vidhyaS
4 Replies

6. Shell Programming and Scripting

Send output of a command as an email

Hello Unix Experts! We are on AIX 6.1 TL6 I am trying to develop a script that does the following: It should send the output of "df -g /directory/folder" command as an email to a user(someone@company.com) This is too simple and i can research on how to do it, but it would be great if... (2 Replies)
Discussion started by: atechcorp
2 Replies

7. Shell Programming and Scripting

Send email if Output is available

hello can anyone debug these lines cd /usr/local/scripts ./build update ./build versions | grep available if then mail -s "update for server `hostname`" $EMAIL else echo -e "$YELLOW No update $RESET" fi echo "Please press a key - Back to main menu . . ." ; read but... (3 Replies)
Discussion started by: nimafire
3 Replies

8. Shell Programming and Scripting

SQL query output convert to HTML & send as email body

Hi , I have a sql query in the unix script ,whose output is shown below.I want to convert this output to HTML table format & send email from unix with this table as email body. p_id src_system amount 1 A 100 2 B 200 3 C ... (3 Replies)
Discussion started by: jagadeeshn04
3 Replies

9. Shell Programming and Scripting

Parse qshape output and send email alert

Hi I need help to do this. This is the output of qshape: user$ qshape deferred|head T 5 10 20 40 80 160 320 640 1280 1280+ TOTAL 0 0 0 0 0 0 0 0 0 0 0 T stands for minutes elapsed and TOTAL... (1 Reply)
Discussion started by: zorrox
1 Replies

10. Solaris

How to output the prstat into table and send through email?

Hi how to send below prstat script output into table format and send through email? prstat|awk '{ if ($9 >= 5) print $0 }' (17 Replies)
Discussion started by: tharmendran
17 Replies
VACATION(1)						    BSD General Commands Manual 					       VACATION(1)

NAME
vacation -- return ``I am not here'' indication SYNOPSIS
vacation -dIi [-f databasefile] [-m messagefile] [-r interval] [-t interval] vacation -dj [-a alias] [-F F|R|S] [-f databasefile] [-m messagefile] [-s sender] [-T A|D] login DESCRIPTION
vacation returns a message to the sender of a message telling them that you are currently not reading your mail. The intended use is in a .forward file. For example, your .forward file might have: eric, "|/usr/bin/vacation -a allman eric" which would send messages to you (assuming your login name was eric) and reply to any messages for ``eric'' or ``allman''. Available options: -a alias Handle messages for alias in the same manner as those received for the user's login name. -d Turn debugging on; don't send an actual message, but print it on stdout. -f database_file Use the specified database_file prefix and append .db to it instead of $HOME/.vacation.db. -F F|R|S Make vacation additionally look in From: (F), Return-Path: (R), or Sender: (S) headers to determine the From: field. -i -I Initialize the vacation database files. It should be used before you modify your .forward file. -j Do not check if the recipient is present in the To: or Cc: lines. Usage of this option is strongly discouraged because it will result in vacation replying to mailing lists or other inappropriate places (e.g., messages that you have been Bcc to). -m message_file Use message_file instead of $HOME/.vacation.msg. -s sender Reply to sender instead of the value read from the message. -r interval -t interval Set the reply interval to interval days. If the interval number is followed by w, d, h, m, or s then the number is interpreted as weeks, days, hours, minutes, or seconds respectively. The default interval is one week. An interval of ``0'' means that a reply is sent to each message, and an interval of ``infinite'' (actually, any non-numeric character) will never send more than one reply. It should be noted that intervals of ``0'' are quite dangerous, as it allows mailers to get into ``I am on vacation'' loops. -T A|D Make vacation additionally look in Apparently-To: (A) or Delivered-To: (D) headers to determine the To: field. No message will be sent unless login (or an alias supplied using the -a option) is part of either the ``To:'' or ``Cc:'' headers of the mail. No messages from ``???-REQUEST'', ``Postmaster'', ``UUCP'', ``MAILER'', or ``MAILER-DAEMON'' will be replied to (where these strings are case insensitive) nor is a notification sent if a ``Precedence: bulk'' ``Precedence: list'' or ``Precedence: junk'' line is included in the mail headers. The people who have sent you messages are maintained as a db(3) database in the file .vacation.db in your home directory. vacation expects a file .vacation.msg, in your home directory, containing a message to be sent back to each sender. It should be an entire message (including headers). If the message contains the string $SUBJECT then it will will be replaced with the subject of the original mes- sage. For example, it might contain: From: eric@CS.Berkeley.EDU (Eric Allman) Subject: I am on vacation Delivered-By-The-Graces-Of: The Vacation program Precedence: bulk I am on vacation until July 22. Your mail regarding "$SUBJECT" will be read when I return. If you have something urgent, please contact Keith Bostic <bostic@CS.Berkeley.EDU>. --eric vacation reads the first line from the standard input for a UNIX ``From'' line to determine the sender. sendmail(8) includes this ``From'' line automatically. Fatal errors, such as calling vacation with incorrect arguments, or with non-existent logins, are logged in the system log file, using syslog(3). FILES
~/.vacation.db database file ~/.vacation.msg message to send SEE ALSO
syslog(3), sendmail(8) HISTORY
The vacation command appeared in 4.3BSD. BUGS
Adding -t A or -t D should only be done for misconfigured or non-compliant MTAs. Doing so may auto-respond to messages that were not sup- posed to be replied to. BSD
August 19, 2004 BSD
All times are GMT -4. The time now is 02:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy