The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem while sending message and attachment with mailx nihar.dutta Shell Programming and Scripting 2 08-09-2007 08:15 AM
Sending email with text & attachment using mailx haryadoon Shell Programming and Scripting 3 07-26-2006 10:49 PM
Sending attachment thru a mail Rohini Vijay UNIX for Dummies Questions & Answers 1 05-12-2006 10:13 AM
Sending email w/ ftp log as attachment idesaj UNIX for Dummies Questions & Answers 2 07-19-2005 08:48 AM
mail or mailx attachment brettmartin99 UNIX for Dummies Questions & Answers 3 03-07-2005 07:27 AM

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

Join Date: Sep 2005
Posts: 10
Problem with mailx command when sending attachment.

Hi,
I have tried to sent a mail with body and attachment. But the shell script got hanging while executing that command. The command is
"(cat body;uuencode att1.csv)|mailx -s "Production Monitoring Report(Unix Side)" milton.yesusundaram@patni.com"

where body is a file having a single line.
att1.csv is a comma separating values file.

Can anyone please help on getting the reason for hanging of the script.

Thanks in advance,
Milton.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-02-2005
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,448
Quote:
"(cat body;uuencode att1.csv)|mailx -s "Production Monitoring Report(Unix Side)" milton.yesusundaram@patni.com"
file destination in uuencode is not specified hence it was hanging

"(cat body;uuencode att1.csv att1.txt)|mailx -s "Production Monitoring Report(Unix Side)" milton.yesusundaram@patni.com"
Reply With Quote
  #3 (permalink)  
Old 12-02-2005
Registered User
 

Join Date: Sep 2005
Posts: 22
try this way ....should work

(cat body;uuencode att1.csv att1.txt)|mailx -s "Production Monitoring Report(Unix Side)" milton.yesusundaram@patni.com"

where att1.csv is the file you are attaching and att1.txt is the file that the person in mail will get as attachment....

it is suppose to work
Reply With Quote
Google UNIX.COM
Reply

Tags
mailx, mailx attachment

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:24 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