LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-07-2011, 05:52 AM   #1
greenpool
Member
 
Registered: Sep 2010
Posts: 41

Rep: Reputation: 0
mail prompts for Cc: in script execution


Hi guys,

in my journey to learn bash scripting i've come across another obstacle and any help would be great.


i'm currently executing the following line in my script:

Code:
mail -s "successful execution of script" root
i was under the impression this would just send the e-mail and that'd be it. but instead its prompting me for a 'Cc: '


any idea why this is happening and how i can stop it?

thanks a lot.
 
Old 09-07-2011, 09:09 AM   #2
tbrand
Member
 
Registered: Jul 2006
Location: Toronto, Canada
Distribution: gentoo
Posts: 33

Rep: Reputation: 17
If the mail command does not see any standard input it assumes that you will provide additional information (like the content of the e-mail) interactively.

Code:
echo "Script executed successfully | mail -s "successful execution of script" root
will do it.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(Samba 3.0.20) Vista prompts for username, XP prompts just for password Noffie Linux - Server 2 07-21-2008 11:26 AM
script execution yakoub Linux - Software 3 11-12-2006 02:26 AM
Script execution salmanucit Linux - Software 1 12-08-2005 09:51 AM
how to create a script that can goto different dir and also to run prompts ann124 Programming 5 11-29-2004 01:48 PM
script execution Johng Programming 2 08-21-2004 05:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration