On Thu, Oct 26, 2000 at 11:21:59AM +0930, Brian Salter-Duke wrote:
> I am not sure whether I am doing something the right way, but I have
> come up against a wall. In the attach menu after saving the message, I
> want to modify the message considerably by piping it to a script. The
> modifications are such that they can not be done in situ. I have to
> create another temporary file. The question is this - how do I replace
> the original temporary file in the tmp directory by the new one so I can
> then send the new file rather than the original? Is there a variable
> that refers to the original file so I can just do:-
>
> mv /tmp/new-file $variable
>
> and overwrite the original message file? I can not find a pointer to
> this but I may be missing the obvious of course.
I do have a solution, but it is nasty, not general and likley to fail.
However it does perhaps explain more clearly what I want to do. The
message is saved in a file in /tmp called "mutt-hostname-some_number. I
pipe this to my script and form the file /tmp/new-file and then at the
end of script add:-
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?
Cheers, Brian.
--
Associate Professor Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]
Chemistry, School of BECS, SITE, NT University, Darwin, NT 0909, Australia.
Phone 08-89466702. Fax 08-89466847. http://www.smps.ntu.edu.au/
Get PGP2 Key:- http://www.smps.ntu.edu.au/chemistry/duke.key.html