you could try something like this if you're using bash as your
shell

-- cut here --

#!/bin/bash

if [ -s aaa.doc ]; then
   mutt   [EMAIL PROTECTED]  -a aaa.doc < message.txt
fi

---

from the man page of test

:  -s FILE
:              FILE exists and has a size greater than zero
:             
:

HTH


As of Tue, Apr 23, 2002 at 11:37:15AM +0530, Sanjay Kumar Goel wrote:
: Hi,
: 
: 
: I am using Mutt for sending mails from a shalll script, This script
: contains follwing entries :-
: 
: mutt   [EMAIL PROTECTED]  -a aaa.doc < message.txt
: mutt   [EMAIL PROTECTED]  -a bbb.doc < message.txt
: 
: Now the problem is that in case aaa.doc is blank then also this mail go
: to the person.
: 
: Can any one suggest me the suitable script, so that the same can check
: the size of the attached file before sending the mail.
: 
: 
: 
: (S. K. Goel)
: 
: 
: 
: _______________________________________________
: linux-india-help mailing list
: [EMAIL PROTECTED]
: https://lists.sourceforge.net/lists/listinfo/linux-india-help

-- 
In order to dial out, it is necessary to broaden one's dimension.
~noufal 

_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to