11-13-2012
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 someone can give me the code for this.
Thanks!
---------- Post updated at 04:12 PM ---------- Previous update was at 04:11 PM ----------
We need to put that script in the crontab, so i just need the code for the above logic
Thanks so much !!!
10 More Discussions You Might Find Interesting
1. Programming
hi all
How do I send email from command prompt?
i tried this
# mutt -s "Test mail" -a /root/Desktop/email1.txt XXXXX@yahoo.co.in < /root/Desktop/email.txt
Error sending message, child exited 71 (Operating system error.).
Segmentation fault
#
and also
root@localhost ~]# /bin/mail -s "what... (0 Replies)
Discussion started by: munna_dude
0 Replies
2. UNIX for Dummies Questions & Answers
Hey Guys,
I have been trying to send a email as ccto a email ID .However it seems the -c option is not working in HP UX system.
It is shooting an error as "mailx: illegal option -- c"
My script isin the below manner:
mailx -c EMAIL_IDS_CC# -s 'BDC reminder' -r sender@email.com... (1 Reply)
Discussion started by: rohit.shetty84
1 Replies
3. Shell Programming and Scripting
Hi,
i want to create a script which should do the following:
1) ping the remote servers and email the hosts which are down
2) netstat on port x on 2 server and email the result too.
I want both results to be sent in the same email.
I have few ideas but i can't finish it.
Here... (4 Replies)
Discussion started by: varu0612
4 Replies
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
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
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
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
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
LEARN ABOUT SUSE
git-imap-send
GIT-IMAP-SEND(1) Git Manual GIT-IMAP-SEND(1)
NAME
git-imap-send - Send a collection of patches from stdin to an IMAP folder
SYNOPSIS
git imap-send
DESCRIPTION
This command uploads a mailbox generated with git format-patch into an IMAP drafts folder. This allows patches to be sent as other email is
when using mail clients that cannot read mailbox files directly. The command also works with any general mailbox in which emails have the
fields "From", "Date", and "Subject" in that order.
Typical usage is something like:
git format-patch --signoff --stdout --attach origin | git imap-send
CONFIGURATION
To use the tool, imap.folder and either imap.tunnel or imap.host must be set to appropriate values.
Variables
imap.folder
The folder to drop the mails into, which is typically the Drafts folder. For example: "INBOX.Drafts", "INBOX/Drafts" or
"[Gmail]/Drafts". Required to use imap-send.
imap.tunnel
Command used to setup a tunnel to the IMAP server through which commands will be piped instead of using a direct network connection to
the server. Required when imap.host is not set to use imap-send.
imap.host
A URL identifying the server. Use a imap:// prefix for non-secure connections and a imaps:// prefix for secure connections. Ignored
when imap.tunnel is set, but required to use imap-send otherwise.
imap.user
The username to use when logging in to the server.
imap.pass
The password to use when logging in to the server.
imap.port
An integer port number to connect to on the server. Defaults to 143 for imap:// hosts and 993 for imaps:// hosts. Ignored when
imap.tunnel is set.
imap.sslverify
A boolean to enable/disable verification of the server certificate used by the SSL/TLS connection. Default is true. Ignored when
imap.tunnel is set.
imap.preformattedHTML
A boolean to enable/disable the use of html encoding when sending a patch. An html encoded patch will be bracketed with <pre> and have
a content type of text/html. Ironically, enabling this option causes Thunderbird to send the patch as a plain/text, format=fixed email.
Default is false.
imap.authMethod
Specify authenticate method for authentication with IMAP server. Current supported method is CRAM-MD5 only.
Examples
Using tunnel mode:
[imap]
folder = "INBOX.Drafts"
tunnel = "ssh -q -C user@example.com /usr/bin/imapd ./Maildir 2> /dev/null"
Using direct mode:
[imap]
folder = "INBOX.Drafts"
host = imap://imap.example.com
user = bob
pass = p4ssw0rd
Using direct mode with SSL:
[imap]
folder = "INBOX.Drafts"
host = imaps://imap.example.com
user = bob
pass = p4ssw0rd
port = 123
sslverify = false
CAUTION
It is still your responsibility to make sure that the email message sent by your email program meets the standards of your project. Many
projects do not like patches to be attached. Some mail agents will transform patches (e.g. wrap lines, send them as format=flowed) in ways
that make them fail. You will get angry flames ridiculing you if you don't check this.
Thunderbird in particular is known to be problematic. Thunderbird users may wish to visit this web page for more information:
http://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email
AUTHOR
Derived from isync 1.0.1 by Mike McCormack.
DOCUMENTATION
Documentation by Mike McCormack
GIT
Part of the git(1) suite
Git 1.7.1 07/05/2010 GIT-IMAP-SEND(1)