09-07-2007
if [[ -f $your_file ]]; then
cat $your_file|mailx -s "$your_file contents..." your_email_address
fi
OR if you want to receive the file as an attachment:
if [[ -f $your_file ]]; then
uuencode $your_file $your_file|mailx -s "$your_file exists..." your_email_address
fi
-d will let you check if a directory exists.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I wrote this script to find files older than time parameter, count the number of files, and send an email to me that some files are in a particular folder. For the particular path, the script should wait delay parameter before running again.
For example, assuming the input file looks... (4 Replies)
Discussion started by: kayarsenal
4 Replies
2. 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
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. UNIX for Advanced & Expert Users
Hi
i am looking for the script which can send file to different mailids, please halp me out.
Thanks in advance. (3 Replies)
Discussion started by: vpandey
3 Replies
5. 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
6. 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
7. Shell Programming and Scripting
Hello guys, im new to to unix/linux
i have a text file like this:
person1@test.com iisiiasasas
person2@test.com 123w2 3233
sajsja person3@test.com jsajjsa
sajsjasaj person4@test.com
I want to extract only e-mail address and get rid of all other stuff, i want an output like this
... (4 Replies)
Discussion started by: RazorMX
4 Replies
8. 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
9. Shell Programming and Scripting
Hello,
I wanted to send mail to multiple receiptant by using uuencode with find command.
I have used the below find command to search a file, which generating daily at the particular time. .
find . -type f -mtime -1 -printf '%f %TH:%TM\n' | awk '$NF>"06:40" && $NF<"06:50" {print $1}'
I... (2 Replies)
Discussion started by: pokhraj_d
2 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 DEBIAN
mipe2dbsts
MIPE2DBSTS(1) User Contributed Perl Documentation MIPE2DBSTS(1)
NAME
mipe2dbSTS.pl - Generates input file for submission to dbSTS
included in output: STS section of dbSTS submission
based on MIPE version v1.1
arguments: * mipe_file
* config file
* (optional) list of PCR IDs
The config file consists of lines containing a key and a value, separated by an equal sign ('=').
The key consists of the lowercase name of the NCBI submission file (see website dbSTS), followed by
an underscore and the lowercase name of the field in that file.
The following fields should be defined in the config file:
pub_title=
pub_authors=
source_name=
source_organism=
cont_name=
cont_fax=
cont_tel=
cont_email=
cont_lab=
cont_inst=
cont_addr=
protocol_name=
protocol_protocol=
buffer_name=
buffer_buffer=
sts_pcr_profile=
For protocol_protocol, buffer_buffer and sts_pcr_profile, more lines are necessary (see example).
An example of a config file look like this:
pub_title=Genetic mapping of chicken SNPs
pub_authors=Aerts,J.A.; Veenendaal,T.; Crooijmans,R.P.M.A; Groenen,M.A.M
source_name=Chicken genomic DNA
source_organism=Gallus gallus
cont_name=Jan Aerts
cont_fax=+31 317 483929
cont_tel=+31 317 483397
cont_email=jan.aerts@wur.nl
cont_lab=Animal Breeding and Genomics Group
cont_inst=Wageningen University
cont_addr=PO Box 338, 6700 AH Wageningen, The Netherlands
protocol_name=Protocol_Aerts
protocol_protocol=Template: 30-60 ng
protocol_protocol=Primer: each 4 uM
protocol_protocol=dNTPs: each 200 uM
protocol_protocol=Taq: 0.3 units
protocol_protocol=Volume: 12 ul
buffer_name=Buffer_Aerts
buffer_buffer=MgCl2: 1.5 mM
buffer_buffer=(NH4)2SO4: 20 mM
buffer_buffer=Tris-HCl: 75 mM
buffer_buffer=Tween 20: 0.01% (w/v)
buffer_buffer=pH: 8.8
BUGS
Unknown. If you encounter one, please let me know (jan.aerts@wur.nl).
SYNOPSIS
mipe2dbSTS.pl your_file.mipe dbSTS.config <pcr_id1> <pcr_id2>
ADDITIONAL INFO
See http://mipe.sourceforge.net
AUTHOR
Jan Aerts (jan.aerts@bbsrc.ac.uk)
perl v5.14.2 2005-07-20 MIPE2DBSTS(1)