On Fri, Oct 27, 2000 at 06:34:36AM +0930 or so it is rumoured hereabouts, 
Brian Salter-Duke thought:
> On Thu, Oct 26, 2000 at 11:21:59AM +0930, Brian Salter-Duke wrote:
> 
> mv /tmp/new-file /tmp/mutt*
> 
> This works. I can now just hit "y" to send the mail. However of course
> it would fail if there was more than one message from mutt in the /tmp
> directory. Is there a better way to refer to this file or pass its name
> in the pipe from the compose menu?
> 

You could do something like

cat > /tmp/mytemp

for i in `ls /tmp/mutt*`; do
        diff /tmp/mytemp /tmp/$i > /dev/null
        test = $?
        if [ $test == "0" ]; then
                filename=$i # Oh, that looks like the filename I need
        fi
done
mv /tmp/mytemp /tmp/$filename

This depends on a reading of diff to see what it returns if it gets 2
identical files to compare.

-- 
Conor Daly <[EMAIL PROTECTED]>

domestic Sysadmin :-)

Reply via email to