On Fri, Apr 16, 1999 at 11:36:55AM +0200, Eric Smith wrote: > I want to send the output of a unix process (i.e. a text stream) by mail as > an attached text file _non_ interactively. I loathe making tmp files and > then deleting them and would like to keep this all in memory using > variables. > > Is there perhaps a way to spoof a text file and get mutt to attach with > `-a' the stream and call the stream filename.txt - or should I just stop > dreaming? There is a way, though it's a bit odd. The trick is to make a FIFO (a la "named pipe"). Try something like this: mkfifo text.txt echo "blah blah blah" | mutt -a text.txt myself@localhost Now mutt will block waiting for data to appear on text.txt. You need to write the data you have into the text.txt pipe. echo "foo" > text.txt (I know you mentioned you wanted to do this under program control, but this is just an example) Now you need to do it twice more as mutt seems to read an attached file three times: echo "foo" > text.txt echo "foo" > text.txt Voila. I'm sure if you looked at the code you could figure out what mutt is reading the file three times for and perhaps avoid having to send the whole thing three times. David -- David Shaw | [EMAIL PROTECTED] | WWW http://www.jabberwocky.com/ +---------------------------------------------------------------------------+ "There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence." - Jeremy S. Anderson