Question related to Emailing from UNIX


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Question related to Emailing from UNIX
# 1  
Old 05-09-2005
Question related to Emailing from UNIX

Hi All,
I would like to write a script which sends an email to clients.

mailx -s "TEST" $EMAIL_RECIPIENTS < FILE ...will send an email to EMAIL_RECIPIENTS with TEST as the subject and FILE as the body.

Now I have a another CONTROL_FILE which is constant all the times (FILE in the above case varies at every run)

I want to include this CONTROL_FILE along with the FILE while sending the email (CONTROL_FILE contents first followed by FILE contents).

Ex :


FILE has :
1tets
2usa
CONTROL_FILE has:
Hello All,.
Thanks for your help.


My out put should send email to $EMAIL_RECIPIENTS with -s TEST like the following way:

~~~~~~~~~~~~~~~~~
Hello All,.
Thanks for your help.

1tets
2usa
~~~~~~~~~~~~~~~~~~

Please note: I do not want to create a another file FILE3 = catting CONTROL_FILE and FILE

Please help.
Thanks,
jingi
# 2  
Old 05-09-2005
Code:
cat file1 file2 | mailx -s "TEST1" X@Y.com

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Issue with emailing format from UNIX

Need help as to why when I try email the following it does not come out right: DateOt=`date +"%a %b %d %T %Y"` TimeOt=`date +%H:%M:%S` interval=`cat $SecDiff| awk '{print $3}'` PortInReq2=`cat /shared/ftpdir/tools/quelog/logs/quelog.NPS_TO_SMG.log | grep PQI | wc -l` PortInRes2=`cat... (2 Replies)
Discussion started by: mrn6430
2 Replies

2. UNIX for Dummies Questions & Answers

Emailing results of a pl sql procedure from UNIX shell script

Hello All, I am writing the below unix script to email the result of a small pl sql procedure: #!/bin/bash ORACLE_HOME=/opt/oracle/orcts/product/9.2.0; export ORACLE_HOME SQLPLUS=$ORACLE_HOME/bin/sqlplus sqlplus -s user/pass@Db_instance<<EOF set echo off set feedback off set pages 0... (9 Replies)
Discussion started by: Bunty bedi
9 Replies

3. UNIX for Advanced & Expert Users

Question related to UNIX and Oracle DB

I have one application server, which is Solaris non global zone (dsapid02-dt3d02 - 10.63.76.96) and a database server, which is Linux (db1-serv26 - 10.63.36.117 & 10.63.36.118). Whenever database admin is starting listener, it starts filling listener log file. Within minutes, it will make file in... (6 Replies)
Discussion started by: solaris_1977
6 Replies

4. UNIX for Dummies Questions & Answers

Question related to 'ps'

If I run a script called 'abc.sh' and then execute the following : ps -ef | grep 'abc.sh' I always get two rows of output, one for the executing script, and the other for the grep command that I have triggered after the pipe. Questions: Why does the second row turn up in the results. My... (10 Replies)
Discussion started by: jawsnnn
10 Replies

5. Shell Programming and Scripting

need downloading related help...but its not related to unix

Hi All, I am trying to dowmload the zip file "zkManageCustomers.zip " but i dont have access. Can anyone help me to download this file See the below link- http://www.ibm.com/developerworks/opensource/library/wa-aj-open/index.html?ca=drs- Please help me as early as... (1 Reply)
Discussion started by: aish11
1 Replies

6. Shell Programming and Scripting

having df command related question

Hi All, When i have run the below command its showing 90% which is critical for production. for this i need the answer of some below question please help me for that. 1) i want to delete some unwanted files. how can i know the unwanted files ?Is it there any way of knowing this?? 2)and... (2 Replies)
Discussion started by: aish11
2 Replies

7. UNIX for Advanced & Expert Users

DOS messaging question - related to UNIX process problem

Hi, This is a strange request. I know there is some sort of crude DOS tool that allows you to communicate to another PC either using its IP adress or PC name. But I can't remember where aor what its called, any ideas? Reason for asking here, Someone has telnet'd on a UNIX server I have... (0 Replies)
Discussion started by: nhatch
0 Replies

8. UNIX for Advanced & Expert Users

One Question related to alias

Hello, I have created following alias in csh lab 'rlogin -l user23 complab23' but problem is complab23 does not allow automatic login by checking .rhosts file. So after typing lab on command line I have to type complicate password and if wrong password is typed thrice then account gets... (4 Replies)
Discussion started by: neerajrathi2
4 Replies

9. Shell Programming and Scripting

a math related question

hello: First I know the rules on Homework related questions, I wrote my script, but I cannot seem to figure out how to do one math problem. How do I take a zip code and seperate the idvidual digits? I used the modulus expression and divided the number by 10 ^ n but that only worked... (9 Replies)
Discussion started by: jahjah
9 Replies

10. UNIX for Dummies Questions & Answers

A Question related to the net

well, I was suggested to remove the contents of the cache as i get out of the browser netscape from the .netscape folder. is that really necessary? if so what are the rest to be done? can anybody please tell me?:rolleyes: (8 Replies)
Discussion started by: sskb
8 Replies
Login or Register to Ask a Question