Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 10-30-2003, 02:38 AM   #1
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, 02:58 AM   #2
Registered: Aug 2003
Location: Suprisingly in Heaven
Posts: 223

Rep: Reputation: 33
Have the body of the letter in a file
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


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

All times are GMT -5. The time now is 06:33 AM.

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