Sponsored Content
Top Forums Shell Programming and Scripting print output of a command in same as shell in mail : please help Post 302490205 by unimaxlin on Monday 24th of January 2011 08:18:42 AM
Old 01-24-2011
i am using gmail to read the mails

---------- Post updated at 08:18 AM ---------- Previous update was at 07:55 AM ----------

i have written a perl script an now it is working

Code:
!/usr/bin/perl -w
$h=`hostname`;
chomp($h);
$to= 'bastian@unimaxlin.com';
$from= 'mail_stat@unimaxlin.com';
open(MAIL, "|/usr/sbin/sendmail -t");
## Mail Header

print MAIL "To: $to\n";

print MAIL "From: $from\n";

print MAIL "Subject: Mail Log Summary for \t$h\n\n";

`/usr/local/bin/pflogsumm -d today /var/log/maillog > /tmp/mailer`;


$i=`cat /tmp/mailer`;

print MAIL $i;

close(MAIL);


Last edited by pludi; 01-24-2011 at 09:21 AM.. Reason: added code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

to print output using shell command

suppose u have 2 files ; where both files have one line in common. say one file like that >gi|62859953|ref|NP_001017322.1| plexin B2 MKEKERTKAITEIYLTRLLSVKGTLQQFVDNFFQSVLNSNQVVPPAVKYFFDFLDEQAEKYEIKDEDTVHIWKTNSLSLR... (13 Replies)
Discussion started by: cdfd123
13 Replies

2. Shell Programming and Scripting

Can we use 'tr' command to print 5th column of output of 'ls -l'

Hi All, I know awk command can do it, but can we use tr command to print 5th column of out put 'ls -l' command???? Regards, Nidhi... (4 Replies)
Discussion started by: Nidhi2177
4 Replies

3. Shell Programming and Scripting

Shell script to search through numbers and print the output

Suppose u have a file like 1 30 ABCSAAHSNJQJALBALMKAANKAMLAMALK 4562676268836826826868268468368282972982 2863923792102370179372012792701739729291 31 60... (8 Replies)
Discussion started by: cdfd123
8 Replies

4. Shell Programming and Scripting

how can i print the output of the shell script in bigger size

how can i print the output of the shell script in bigger size eg: echo " hello world" i want to print this in the output with bigger size in the middle of the screen. can someone please help me out in that (2 Replies)
Discussion started by: mail2sant
2 Replies

5. AIX

How to mail the output of a command in AIX

Hi, I have mastered how to mail to Windows in AIX. Can anyone tell me how I would mail the output command df -g to an email? I want to set a job in cron to mail df -g as the contents of a mail. Any ideas? Thanks John (4 Replies)
Discussion started by: jfd7000
4 Replies

6. Shell Programming and Scripting

awk command : To print the output to a file

half of the problem is already solved with the help of bartus11 suggestion I have a txt file having rows and coulmns, i want to perform some operation on a specific coulmn starting from a specific line. 50.000000 1 1 1 1000.00000 1000.00000 ... (5 Replies)
Discussion started by: shashi792
5 Replies

7. UNIX for Dummies Questions & Answers

Print each output of loop in new column using awk or shell

I have this output from a loop a11 1,2 3,4 5,6 7,8 12,8 5,4 3,6 a12 10,11 12,13 15,18 20,22 a13 ... (3 Replies)
Discussion started by: maryre89
3 Replies

8. Shell Programming and Scripting

How to print the output of a select query using shell script?

HI, I want to connect to database and fetch the count from a table. The sql query is as below : select count(*) from table_test where test_column='read'; How can I print the output of this statement using shell script. Thanks in advance. (4 Replies)
Discussion started by: confused_info
4 Replies

9. Shell Programming and Scripting

[Solved] Shell script output in HTML or with table like results and mail

Hello, Currently i have a script which will disply the results in plain text format. I want to format the result in more readable format like Making bold headings and format with colors etc. Something like html and send that content as email. Please help me how i can do that. I am using... (10 Replies)
Discussion started by: joy lobo
10 Replies

10. Shell Programming and Scripting

Need to Print output in table using shell script

#! /bin/ksh #] && . ./.profile 2>/dev/null if test -f '.profile'; then . ./.profile; fi; #. .profile LOG_DIR=/app/rpx/jobs/scripts/just/logs sendEmail() { pzCType="$1"; pzTitle="$2"; pzMsg="$3"; pzFrom="$4"; pzTo="$5"; pzFiles="$6"; pzReplyTo="$7" ( ... (4 Replies)
Discussion started by: ankit.mca.aaidu
4 Replies
CLAWS-MAIL-TNEF-PARSER(1)				      General Commands Manual					 CLAWS-MAIL-TNEF-PARSER(1)

NAME
claws-mail-tnef-parser -- TNEF parser plugin for Claws Mail DESCRIPTION
This manual page documents briefly the claws-mail-tnef-parser This manual page was written for the Debian distribution because the original program does not have a manual page. claws-mail-tnef-parser is a plugin (loadable module) for the Claws Mail mailer. Allows decoding of application/ms-tnef attachments (also known as winmail.dat files) within Claws Mail. USAGE
Before using a plugin you must instruct Claws Mail to load it on startup. For this you must go ``Configuration'' menu on main window toolbar, open ``Plugins...'' dialog, click on the ``Load plugin...'' button and select the plugin file, named tnef_parse.so, and press the ``Open'' button. SEE ALSO
claws-mail (1), claws-mail-extra-plugins (1), ytnef(1). AUTHOR
claws-mail-tnef-parser was written by Colin Leroy colin@colino.net This manual page was written by Ricardo Mones mones@debian.org for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. CLAWS-MAIL-TNEF-PARSER(1)
All times are GMT -4. The time now is 06:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy