The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
DOS messaging question - related to UNIX process problem nhatch UNIX for Advanced & Expert Users 0 05-13-2008 08:51 AM
One Question related to alias neerajrathi2 UNIX for Advanced & Expert Users 4 01-24-2008 01:43 AM
signals related question ninjanesto High Level Programming 2 02-13-2007 10:43 AM
a math related question jahjah Shell Programming and Scripting 9 09-13-2004 07:56 AM
A Question related to the net sskb UNIX for Dummies Questions & Answers 8 10-03-2001 06:37 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-09-2005
Registered User
 

Join Date: Mar 2005
Posts: 47
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
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-09-2005
bhargav's Avatar
Registered User
 

Join Date: Sep 2004
Location: USA
Posts: 511
Code:
cat file1 file2 | mailx -s "TEST1" X@Y.com
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:57 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0