[Note: moved to mutt-users only!] > I am using mutt to send e-mail messages to the development group > following a product build/compile. Now I am writing some scripts for a > new product which is made out of multiple modules each of which will be > built individually. I may find myself in a situation where I do not know > how many *.log files I end up with after the build. If I do try to send > a message and try attach and inexistent file -:) , mutt will not send > it, of course. > > My question is: Is there a way that I can tell mutt to attach whatever > *.log files happen to exist in the current directory, from within a > script, knowing that there may me one or more such files? Let the script build the mutt command line. attach= for i in *.log ; do test -s "$i" && attach=" -a $i" ; done ... mutt -s "$subject" $attach rcpt </dev/null