02-29-2008
Simple (but not the best) way:
print "something
something else
.
"|mail username@server
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In shell script how can I attach a file and send a mail.
suppose if I written like the following way
usr/bin/mail 'subject" "mail_id" < file.
a mail goes to the mail-id with the content of file.But I want the file to be atttached to the mail.How can I get it.is there any way for this.
... (9 Replies)
Discussion started by: Mar1006
9 Replies
2. Shell Programming and Scripting
I need a shell script which checks for a file in a particuler folder and should send me a mail if the file of that name is present.
Please help me on this.I am new to shell scripting. (6 Replies)
Discussion started by: jayaramanit
6 Replies
3. Shell Programming and Scripting
Hello,
I am new to perl and need to create a script that will read a file and pull a name from the file and send e-mail.
How can I use the following awk statement in a perl script?
grep UNIXadmins /root/mail.conf | awk '{ print $2}'
and use the output to send a e-mail.
Any help would... (1 Reply)
Discussion started by: DC Heard
1 Replies
4. Shell Programming and Scripting
i have serverA and serverB and i have a folder with same name an location in both servers.... Now i want to compare files in folder(serverA) with folder (serverB) if there are files missing in folderB then copy those files from folder(serverA) to folder(serverB) (1 Reply)
Discussion started by: ashahzad
1 Replies
5. Shell Programming and Scripting
I have a list of mail ids in text file and want a ksh script that reads this text file and sends a mail to all mail ids with same subject line and content.
I am using UX-HP machine and KSH.
Thanks for help in advance! (5 Replies)
Discussion started by: Sriranga
5 Replies
6. UNIX for Dummies Questions & Answers
Hi
The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment .
cat Employee.sql
SET VERIFY OFF
SET PAGESIZE 200
SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON -
HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies
7. Shell Programming and Scripting
Hi i have a script for show the information files. ls -l
how do you for to place this result in a file of text and to send it attached for e-mail.
The information of the mail must be in paramentros. for example e-mail to I must write the e-mail, the subject and the motive of the mail!
... (1 Reply)
Discussion started by: krlos07
1 Replies
8. Shell Programming and Scripting
Hi Folks,
I have few mailids in a text file and need to check whether the mailid is in correct format or not.
If just to check whether the string is a mailid or not there is a perl module Email::Valid to do the business or we can implement our own logic.
But the mail_ids I am having is... (4 Replies)
Discussion started by: giridhar276
4 Replies
9. Shell Programming and Scripting
ENVIROMENT
Linux: RHEL 6.4
Log Path: /usr/iplanet/servers/https-company/logs
Log Format: user.log.03-15-2015
I have log4j log rotation enabled rotating files on a daily basis.
The rotated logs are NOT compressed & are taking up too much space.
I need a script that will run daily that... (1 Reply)
Discussion started by: admin_job_admin
1 Replies
10. Shell Programming and Scripting
I need to check my script and change to working mode. currently it was not sending the mail and exit without calling the second script.
I need to check the file is present ="/home/Rvtools/test.csv"
if this file not found after the time retry send mail file not found
If the file exit run the... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
LEARN ABOUT OSF1
mailstats
mailstats(8) System Manager's Manual mailstats(8)
NAME
mailstats - Displays statistics about mail traffic
SYNOPSIS
mailstats [-o] [-C cffile [-f stfile]
FLAGS
Do not display the name of the mailer in the output. Use cffile as the name of the sendmail "cf" file instead of /var/adm/sendmail/send-
mail.cf. Use stfile as the input statistics file instead of /var/adm/sendmail/sendmail.st.
DESCRIPTION
The mailstats command reads the information in the /var/adm/sendmail/sendmail.st file (or in the file specified with the -f flag), formats
it, and writes it to standard output. Note also that you can change the location of the sendmail.st file by editing its pathname in the
sendmail.cf file.
EXAMPLES
The format of the information is shown in the following example, in which the first field (M) contains a number that indicates the position
of that mailer in the sendmail.cf file, starting at 0 (zero). For example, the first mailer in the sendmail.cf file corresponds to the
number 0 in the mailstats display, the second mailer corresponds to the number 1, and so on. Statistics from Thu Feb 17 11:20:01 2000 M
msgsfr bytes_from msgsto bytes_to msgsrej msgsdis Mailer 1 50 77K 1 3K 0 0 local 6
43 59K 58 99K 0 0 smtp ============================================================ T 93
136K 59 102K 0 0 The fields in the report have the following meanings: Indicates the position of the mailer in
the sendmail.cf file. Indicates the number of messages received by the local machine from the indicated mailer. Indicates the number of
bytes in the messages received by the local machine from the indicated mailer. Indicates the number of messages sent from the local
machine using the indicated mailer. Indicates the number of bytes in the messages sent from the local machine using the indicated mailer.
Indicates the number of rejected messages. Indicates the number of discarded messages. Indicates the name of the mailer.
If sendmail transmits mail directly to a file, such as the dead.letter file or an alias target, the message and byte counts are credited to
the prog mailer, as defined in the sendmail.cf file. However, mailstats will still default to var/adm/sendmail/sendmail.st.
FILES
Specifies the command path Contains system statistics Contains configuration information for sendmail
RELATED INFORMATION
Commands: sendmail(8) delim off
mailstats(8)