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

QUESTION ABOUT INSERTING A SYSTEM DATE

Status
Not open for further replies.

PrgrmsAll

Programmer
Apr 8, 2003
180
US
i am using the following piece of code in a job:

MESSAGE=email1.txt

TO="aaa@xyz.com"
CC="bbb@xyz.com;ccc@xyz.com"
SUBJECT="_"

echo ~c "$CC" >> $MESSAGE
echo ~s "File Transfer: Successful" >> $MESSAGE
echo "The requested files have been successfully transferred" >> $MESSAGE
echo "to the designated directory. They were processed on " >> $MESSAGE
echo Date >> $MESSAGE
echo "No errors were reported." >> $MESSAGE
echo "" >> $MESSAGE
echo "Thank you." >> $MESSAGE
echo "" >> $MESSAGE
echo "C. Hunter" >> $MESSAGE

mailx -s $SUBJECT $TO < $MESSAGE

this works fine, for the most part. however, i have two questions: firstly the word "Date" is being inserted in the file and not the date value. how do i insert the date value? secondly, the CC portion does not deliver the email, even though the recipients appear in the CC line when it is received by aaa@xyz.com.

thanks in advance.
 
Through trial and error, I actually figured this out. The date thing was a silly mistake, I took off the echo and it worked. The cc: was getting confused with the ";" delimiter and, when it was removed, worked just fine.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top