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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INCLUDING COMMANDS WITHIN MAILX

Status
Not open for further replies.

hubud

Instructor
Oct 18, 2002
123
GB
Hi, i'm trying to include some script commands in a mailx command, in order to pass information current at the time of the mailx script.
What I get however is the piece of script text, not the result I'm hoping for.

Below is an example at the command line:

mailx jcurry@somewhere.com
Subject:

"`"at -l | tail -1"`"
.


The result I get is "`"at -l | tail -1"`". I have tried passing variables but got the same.

Any ideas appreciated


cheers

simmo
 
This is one syntax..
[tt]
(
echo message
at -l | tail -1
echo et cetera
) | mailx -s "subject" jcurry@somewhere.com
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top