LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-30-2003, 03:38 AM   #1
mema
LQ Newbie
 
Registered: Oct 2003
Posts: 2

Rep: Reputation: 0
how to execute mail command in a shellscript


pls tell me how to excute mail command in shell script

i had given mail -s "hello raj" raj in shell,
where raj is username
but when i execute that script cursor is wainting for input until i press cntrl+d

But i have to send mail to a user in a shellscript not from the prompt
 
Old 10-30-2003, 03:58 AM   #2
SaTaN
Member
 
Registered: Aug 2003
Location: Suprisingly in Heaven
Posts: 223

Rep: Reputation: 32
Have the body of the letter in a file
Code:
cat body.txt | mail -s "Hello raj" raj
will send a mail with body.txt as body of the letter and
subject as Hello raj
 
  


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
execute system command in c alaios Programming 3 07-13-2005 06:26 AM
remote command execute telnet with 1 command MPowers Linux - Networking 2 06-30-2005 07:31 AM
execute command from c code alaios Programming 3 06-06-2005 06:26 AM
command execute without ./ kaon Slackware 11 09-15-2004 06:14 PM
Execute Command lawrencegoodman Linux - Newbie 2 10-23-2003 09:36 AM


All times are GMT -5. The time now is 12:41 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration