Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

/usr/ucb/mail waiting for some user input why?

Status
Not open for further replies.

Chrissirhc

Programmer
May 20, 2000
926
GB
Hi

I run this line in a script:

usr/ucb/mail -s "Hope you get this" "myname@myhost.com"

It just sits there waiting for user input.

When I run it from the shell I can press "." and then enter. And then it sends the mail.

What do I have to do to the command to make it send the mail without any user input??

thanks,

Chris
 
You can try either of following:
echo "." | usr/ucb/mail -s "Hope you get this" "myname@myhost.com"
usr/ucb/mail -s &quot;Hope you get this&quot; &quot;myname@myhost.com&quot; </dev/null


Hope This Help
PH.
 
Yes it is thanks alot. I've used the second one. What is the meaning?


thanks,

Chris
 
man mail
man yourshell for input redirection explanation

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top