![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sending mail from unix | anki_1 | UNIX for Dummies Questions & Answers | 3 | 04-09-2008 04:03 PM |
| Sending mail in C/C++ in unix server | electroon | High Level Programming | 6 | 01-21-2008 11:58 AM |
| sending mail from unix is failing | trichyselva | UNIX for Dummies Questions & Answers | 1 | 01-21-2008 04:57 AM |
| Sending mail thu unix | hellotosatish | UNIX for Dummies Questions & Answers | 6 | 09-15-2007 09:46 PM |
| Sending Mail Thru Unix Script | Omkumar | Shell Programming and Scripting | 5 | 03-31-2005 12:29 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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.... |
|
||||
|
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 |
|
||||
|
thank you!
Last edited by bobprabhu; 02-01-2008 at 06:32 AM.. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|