![]() |
|
|
|
|
|||||||
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sending mail from unix | anki_1 | UNIX for Dummies Questions & Answers | 3 | 04-09-2008 01:03 PM |
| Sending mail in C/C++ in unix server | electroon | High Level Programming | 6 | 01-21-2008 07:58 AM |
| sending mail from unix is failing | trichyselva | UNIX for Dummies Questions & Answers | 1 | 01-21-2008 12:57 AM |
| Sending mail thu unix | hellotosatish | UNIX for Dummies Questions & Answers | 6 | 09-15-2007 06:46 PM |
| Sending Mail Thru Unix Script | Omkumar | Shell Programming and Scripting | 5 | 03-30-2005 09:29 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi people
Can u help me aorund on this cat $DISTRIBUTION_LIST | tail -1 | read mailtolist test -s $INOVOICES.dat if [ $? -gt 0 ] then echo " Sales Report generted" | read subject mailx -ms "${subject}." $mailtolist RET_CODE=$? if [ $RET_CODE -ne 0 ]; then echo "Messaging Failed." >> $LOG_FILE exit 1 fi else echo "NO Report" | read subject mailx -ms "${subject}." $mailtolist RET_CODE=$? if [ $RET_CODE -ne 0 ]; then echo "Messaging Failed." >> $LOG_FILE exit 1 fi fi echo 'END DATE : ' `date` >> $LOG_FILE exit $RET_CODE If the file is greater than Zero byte it shuld send a mail with a subject Sales Report generted ,if the file is zero byte,it shuld send a message like No reports. i created the above code...it's not working ...anybody can help me to modify the script....it's little bit urgent.... |
| Forum Sponsor | ||
|
|
|
|||
|
May you could try this,
Code:
#!/bin/ksh if [[ -s /tmp/report ]] ; then echo "Ready to be mailed" else echo "File is empty" fi Thanks Nagarajan G |
| Thread Tools | |
| Display Modes | |
|
|