On Wed, Mar 14, 2001 at 12:25:34PM +0200, Dirk Laurie wrote:

> I can write a little script, e.g.
> 
> # /bin/sh
> MBOX=$$
> cat > /tmp/$MBOX
> mutt -f /tmp/$MBOX
> rm /tmp/$MBOX
> 
> but mutt seems to know that it is not being invoked from a terminal
> and tries to go into send mode.
> 
> Am I missing a simple trick? 

This seems to work:

    #!/bin/sh
    MBOX=$$
    cat > /tmp/$MBOX
    exec < /dev/tty         # Change stdin to the controlling tty.
    mutt -f /tmp/$MBOX
    rm /tmp/$MBOX

This also fixes the missing "!" from "#!", but that wasn't the problem.

HTH,
Gary

-- 
Gary Johnson                               | Agilent Technologies
[EMAIL PROTECTED]                   | RF Communications PGU
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA

Reply via email to