The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
sending mail parmeet UNIX for Dummies Questions & Answers 11 05-13-2009 03:37 AM
hp ux not sending mail kkhan HP-UX 3 01-31-2008 11:27 PM
Mail sending panknil Shell Programming and Scripting 15 09-19-2007 01:24 AM
Sending Mail parmeet UNIX for Dummies Questions & Answers 1 01-23-2007 05:08 AM
sending a mail to a mail client solaris73 UNIX for Dummies Questions & Answers 5 11-18-2002 01:58 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-05-2006
ting123 ting123 is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 25
Question help on sending mail in ksh

folks,

I wrote a script like follow for sending notification email, but the problem is cannot pass the multiple words to the subject line, any help:

=======================================
send_msg () {
send_email $1
exit 1;
}

send_email () {
mail -s $1 $mail_address << MAIL
test
MAIL
}

if [ ! -f test.again ]; then
send_msg "No file found"
fi

======================================

the subject line should be "No file found", but the output from this script only "No", I also tred to put "", but got error msg.

Any help?

Thanks
  #2 (permalink)  
Old 04-05-2006
mahendramahendr mahendramahendr is offline Forum Advisor  
Registered User
  
 

Join Date: Dec 2005
Location: London
Posts: 222
you should do

send_email "$1" instead of send_email $1

same with

mail -s "$1" $mail_address << MAIL
  #3 (permalink)  
Old 04-05-2006
ting123 ting123 is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 25
Smile

that's right, I missed """, thanks.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:21 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0